• Decrease font size
  • Reset font size to default
  • Increase font size
Article Index
Introduction to Merapi
Why Merapi Was Created
Building a Bridge between AIR™ and the OS
How Merapi Works
Merapi Project Team
All Pages

An Introduction to Merapi

- A volcano on the island of Java
- A software bridge between Adobe AIR applications and Java

Merapi is a bridge between applications written in Java and those running in and created for Adobe AIR™ (Adobe Integrated Runtime™).

Merapi has been designed to run on a user's machine, along with an Adobe AIR™application and providea direct bridge between the Adobe AIR™ framework and Java, exposing the power and overall calabilities of the user's operating system, including 3rd party hardware devices.

With a light weight and straightforward API, developers can leverage the OS by writing Java companion applications for their AIR™ applications. Java programs treat Merapi as a bridge to the running Adobe AIR™ application and vice-versa.

Developers can build their Flex, Flash and AJAX applications for Adobe AIR™, and use Merapi to make them do things that AIR just can't do by itself.

The Merapi project team, is proud to announce that the private alpha release has been completed and is available to select members of the Flex/AIR/Java community. We've had a lot of interest and have been contacted by a variety of individuals who have expressed interest in joining our efforts.

If you'd like to get involved with Merapi as a Alpha user, please register!!

Why Merapi was Created

Merapi was created to extend the capabilities of applications built on the Adobe AIR™ platform.

Adobe AIR™ has been recognized a revolutionary step forward in "next generation" software design and development.

With AIR's launch, the massive community of Flash, Flex and AJAX Web developers were provided the ability to build desktop applications using the tools and technologies with which they are already familiar. Using the Adobe AIR™ API, their "Web" applications can become integrated with the user's desktop operating system.

The Merapi Project

AIR is a framework that does most of the hard work for you. It enables applications to run locally, connect to Internet services, store data locally, and access information stored on the usre's file system. It's great, and the team that founded the Merapi project are huge proponents of the Adobe AIR™ platform, as well as Flash, Flex and other Adobe technologies.

We are passionate software designers and developers, with a primary goal of pushing the possibilities of user experiences.

In order to provide the best user experiences, we often find ourselves in a postion to try and push the limits on available technologies. When coming up with ideas about cool applications that could be build on the Adobe AIR™ platform, some of the most innovative concepts for "Rich, Connected" desktop applications were even outside the capabilities that AIR™ was able to provide.

One of the biggest benefits of Rich applications developed using Adobe technologies is the ability to provide killer user interfaces and what we consider to be "next generation" user experiences. Professionally, most of the members of the Merapi Project team do this every day for clients.

While AIR™ is a huge jump by itself, we found ourselves asking:

  • Could we connect an AIR™ application to a wii remote?
  • Could we use AIR™ to talk to a phone plugged in via USB?
  • What if we wanted to do TWAIN Capturing of Video or Images from a camera or scanner?
  • Could we control robots with an AIR™ application?
  • What about sending MIDI signals to instruments over a network using an AIR™ application?
  • Could I build a social-networking AIR™ application that controlled hardware devices?

Adobe AIR™ doesn't allow for these things natively. We realize that Adobe might do this in the future, and make Merapi obsolete. While it would represent an end to the value our open source project, it would be for the best! It would mean that we could build bigger, badder, and bolder desktop applications using Flex, Flex Data Services, LiveCycle, and other Adobe products... and we'd be able to do so without having to "build the bridge" to the OS, which is what we've done with Merapi.

The Merapi Project

Building a Bridge between Adobe AIR and Java (OS)

Merapi is a Java™ application, intended to run on a user's (client) computer. Merapi connects other Java™ applications on the user's computer to Adobe AIR™ applications that the user has installed.

It isn't magic. You have to develop your Adobe AIR™ application in a way that allows it to connect to Merapi. Merapi acts as a "middle man", passing objects between your AIR™ application and your Java™ application.

Using Merapi, Adobe AIR™ applications can "talk" to other software that the user has installed on their computer. In addition, Merapi allows AIR™ applications to serve as a user interface to just about anything that a Java™ application can do on a user's computer.

How Merapi Works

Merapi is a framework that bridges an AIR application with a Java application, both running on the desktop. This communication is accomplished through a class that exists in Java and ActionScript called merapi.Bridge.


The simplest way to interact from AIR to Java is by sending and receiving messages though the bridge.


Merapi: A Bridge between Adobe AIR and Java

Sending a message from ActionScript:


var message : Message = new Message();

message.data = "Hello from Merapi Flex.";

message.type = "Reply";

Bridge.instance.sendMessage( message );



Sending a message from Java:


Bridge bridge = Bridge.getInstance();

Message message = new Message();

message.setData("Hello from Merapi Java.");




Receiving a message in Flex:


id="bridge" result="handleResult(event)" />




private function handleResult( event : ResultEvent ) : void


var message : IMessage = event.result as IMessage;


Receiving a message in Java:

Bridge.getInstance().registerMessageHandler("Reply", messageHandlerInstance );

public void handleMessage( IMessage message )


System.out.println( message.getData() );



More advanced features are available in the framework for creating proxy objects in ActionScript or Java that automatically cause a mirrored instantiations and invocations on the corresponding side of the bridge. This functionality is essentially an abstraction of the basic messaging framework described above.


The Merapi Project Team

Adam Flater - http://www.adamflater.net
Adam is the originator / creator of the Merapi Project.  He's been a Flex Architect since 2005 and a was a java developer before that. Adam is an Evangelist and Architect at Roundarch and is responsible for the architecture and development of Roundarch's Merapi Platform, which adds a variety of additional features and functionality over and beyond the original Merapi Open source project. These platform-specific enhancements include integration with Microsoft Silverlight, .NET, AJAX and other Rich Internet and Desktop Platforms / Operating Systems.

Dave Meeker - http://www.whatanexperience.org
Dave has been leading Software and Web application design and development projects since 1995 and specializes in user experience strategy and creative technology. Dave's been working with Flash player content since 1996 and has been designing Flex applications since 2003. Previously with Whittmanhart and Managing Partner of EffectiveUI, he now works at Roundarch as Director of Emerging Technology and Co-Director of Roundarch Labs and oversees partner relationships with Adobe and Microsoft. Dave has been working with Adam to bring Merapi to market, working with companies such as  Microsoft and Adobe to guide the roadmap and development of both the Merapi open source project, and the Roundarch Merapi platform, that extends beyond Java and Adobe AIR.

Very special thanks to:

Andrew Powell - http://www.infoaccelerator.net
Andrew has been architecting and developing web applications for over 10 years using ColdFusion, Flex, AJAX, and Java. Currently, his focus is on integrating enterprise Java technologies such as Spring and Hibernate with Flex and AIR applications. Andrew works for Universal Mind. Andrew has been giving talks on how to use Merapi since Adam released the very first private alpha code release and has built some fantastic applications that leverage external hardware.