Aerith Source Released!
After a bit of a wait since JavaOne, the Swing Team has finally been able to release the source for their demo application Aerith! I would have posted about it yesterday, but I wanted to get it running first. In case you don't know what Aerith is, it is an application that allows you to view your flickr photos and create a trip report from them. Being a fellow Flickr application developer, I was very interested to see this app for myself. There are a few blogs about Aerith from the developers, but none of them give you any instruction on how to get Aerith up and running. So I decided to do that for myself. Read on to see how I got Aerith running on Mac OS X. Congrats to the Swing team! Now if they would just release the Extreme GUI Makeover source!
First, these instructions are very Netbeans centric. So if you aren't using netbeans, you will probably be in the dark...hehe.
To get Aerith up and running, you first need to go check out the source code. Aerith is controlled in a Subversion repository on java.net, so you will need a subversion client to check out the source. You can find one here, but I used this one for OS X because the fink version is behind...Once you have installed svn, open the Terminal and create a directory to check things out into.
# mkdir aerith.trunk
# cd aerith.trunk
# svn checkout https://aerith.dev.java.net/svn/aerith/trunk aerith --username guest
With the code checked out, launch netbeans and open the Aerith project. From here I learned of a few dependancies Aerith had:
1 - Java SE 6.0
2 - The SwingX project
3 - JOGL (I knew they were using it, but you have to get it seperately.)
So I'll tell you how to get all 3.
#1 - Java SE 6.0 - It is currently still in beta if you didn't know. If you are running Mac OS X, you can get the Java SE 6 Preview from the Apple Developer Connection. You must be a member (it's free) to download it. So go get it! Download and install it.
After you have installed it, in netbeans, go to the Tools menu and open the Java Platform Manager. Click Add Platform. It took me right to where all the versions are, but in case it didn't for you, browse to here:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6 and select Home
You done with that
#2 - SwingX - SwingX is another java.net project that can be found here:
https://swingx.dev.java.net
You must be a java.net member to get this project, so log in and click on the Version Control - CVS link on the left. It will give you the CVS commands you need to check out swingx. I checked it out in the same directory as my aerith baseline.
After you checked that out, open that project in netbeans. This project will complain about a reference problem. Right Click on the project and go to Resolve Reference Problems. It is missing JMock. Click resolve and it will take you the Library Manager. Add a new library and call it JMock. Then add a jar to it - browse to the swingx/lib dir and select the JMock jar. SwingX should be happy now.
#3 - JOGL - This is the Java™ Binding for the OpenGL® API. It is also another java.net project! (Imagine that!) This one you can just download. Go to https://jogl.dev.java.net/ and then click on Documents and Files. Then browse to jogl-> Release Builds 2006-> JSR-231 beta 05 - June 8. Download the jogl.jar and find the jogl-natives for you platform. Mine was jogl-natives-macosx-universal.jar. Put both of these into the aerith/lib directory. Unpack the jogl-native jar into the lib directory.
Then in netbeans, Resolve Reference Problems for the aerith project. It is missing 2 jars. jogl.jar and jl1.0.jar. Click resolve and browse to the lib directory and select the one you choose to resolve. Both should be resolved now. If not, browse to the other one as well.
Now we have to tell aerith which Platform to run with. Get properties on the aerith project. Go to libraries and at the top should be the Java Platform. Select the Java 1.6.0.
And last, you have to tell the VM where your JOGL native libraries are. Still in the properties for the aerith project, go to the Run selction. In the VM Options, add the following to the very end:
-Djava.library.path=lib
You should now be set to build and run Aerith! It will launch and ask for your flickr account name. If you don't have one and just want to see it run, put mine in: serff.
Hopefully this has been useful to someone out there. Please let me know if it was!