« Efflex Effects | Main | Merapi Voice – new AIR/Java example »
How to checkout Merapi Examples
| By Rich Tretola | May 30, 2009 | |
| 3,837 views |
There was a question on how to use the Merapi examples. So, here is a quick tutorial using eclipse with subclipse svn plugin and the Flex Builder 3 plugin.
Ok, lets get started with the AIR application.
Assuming you have eclipse open, Choose File > Import. This will open the Import window. Now choose SVN > Checkout Projects from SVN as shown below.

Click Next, and Create a new repository location. Click Next again. Enter http://merapi-examples.googlecode.com/svn/trunk in the Url as shown below.

Click Next, then expand the tree to show the screencapture projects. Select merapi-example-screencapture-flex as shown below, then click Next.

Next select Check out as a project configured using the New Project Wizard as shown below. Now, click Finish.

The New Project Wizard will now appear. Select Flex Builder > Flex Project as shown below.

Click Next and enter merapi-example-screencapture-flex as the Project name, also be sure to set the Application type as Desktop application (runs in Adobe AIR) as shown below and then click Finish.

The project will now be checked out from SVN.
Once this completes, you will need to update the project by setting the main application file. Right click on the project name and choose Properties.
The Properties window will now open. Select Flex Applications, and then click on the src folder and click the Add button as shown below.

After clicking Add, the Add Application Files window will open. Select MerapiScreenCapture.mxml and click OK as shown below.

Finally, expand the src folder, highlight MerapiScreenCapture.mxml and click Set as Default, then click OK as shown below.

That is it for the AIR application, now on to the Java application.
As we did previously, select choose File > Import. This will open the Import window. Now choose SVN > Checkout Projects from SVN as shown below.
Select http://merapi-examples.googlecode.com/svn/trunk in the Select/Create Location window as it should now be an existing repository.

Expand the tree so that you can select merapi-example-screencapture-java and click Next.

Next select Check out as a project configured using the New Project Wizard as shown below. Now, click Finish.
Within the Select a wizard window select Java > Java Project as shown below and then click Next

Enter the project name of “merapi-example-screencapture-java” within the Create a Java Project window and click Finish

The Select a wizard window will open again, this time select Java > Java Project as shown below.

Now within the New Java Project window enter the project name “merapi-example-screencapture-java” and click Finish.

The project will now be downloaded from SVN and will show errors until you add the required jar files. To do this, right click on the project and select Properties.
Within the Properties window select Java Build Path > Libraries and then click on the Add Jars button as shown below.

Within the JAR Selection window, open the merapi-example-screencapture-java folder and then the libs folder. Select all of the jars within the libs folder and click ok as shown below.

That’s It! You should now have both projects checked out and compiled on your machine. All that is left now is to open up the ScreenCaptureRunner.java file within the merapi.examples.screencapture package and run it. While it is running navigate to the MerapiScreenCapture.mxml file within the merapi-example-screencapture-flex project and run it as well. You should now be able to click on the Take Screen Shot button and see a screen shot thumbnail added to the AIR application. I hope this helps.
Topics: Adobe AIR, Artemis/Merapi, Eclipse, Flex | 9 Comments »








June 1st, 2009 at 6:09 am
Thanks for this tutorial, it’s great !
Reply to this comment
June 1st, 2009 at 7:01 am
[...] How to checkout Merapi Examples [...]
June 4th, 2009 at 6:31 pm
[...] http://blog.everythingflex.com/2009/05/30/how-to-checkout-merapi-examples/ (Rich is da man!) [...]
July 24th, 2009 at 4:34 am
This is very nice, why isn’t this published within the merapi google site? http://code.google.com/p/merapi/
Reply to this comment
August 26th, 2009 at 10:36 am
Hello,
the examples repository is empty…
ty..
Reply to this comment
Adam Flater Reply:
September 11th, 2009 at 12:50 pm
@cristian
I’m not sure how you are seeing the repo as empty. If you follow this link:
http://code.google.com/p/merapi-examples/source/browse/trunk/helloworld/merapi-example-helloworld-flex/src/MerapiHelloWorld.mxml
You will see the source that’s checked into the repo.
Hope you’re able to resolve the issue…
cheers
-adam
Reply to this comment
cristian Reply:
September 15th, 2009 at 12:26 pm
@Adam
Im sorry, what I meant to say is that trying to checkout the project through svn throws a “No nodes under root” error…
Anyways, I already got the hang of it, so I wont need the examples anymore…
Thank you very much and keep the good job on merapi!!
Reply to this comment
September 15th, 2009 at 11:42 am
Hi Rich,
I did everything as in your tutorial but I’m getting this when trying to run the Java file:
log4j:WARN No appenders could be found for logger (merapi.Bridge).
log4j:WARN Please initialize the log4j system properly.
I’ve digged a lot through the internet but nothing related appears. Can you please help? It would be much appreciated.
Best regards,
Luís
Reply to this comment
October 27th, 2009 at 10:11 pm
Very quality tutorial. Thank!
Reply to this comment