Posted by jfalkner
on December 31, 2007 at 8:17 PM PST
I just picked up a pair of Nokia n810s. One for me and one for the significant other. They are pretty amazing -- dare I say much cooler than the iPod touch? I also quickly discovered coding apps for the n810 in Java is trivial. Here is how I made a simple SWT (i.e. GUI app. You'll have to use GTK instead of Swing) app.
The Nokia n810 is pretty fantastic, but I'll let you look that up elsewhere. Plenty of places do a good job showing it off. I'll focus on how easy it was to set up and make a graphical Java program.
Before getting started, I must thank both the developers at the Jalimo project for porting a JVM and the Eclipse SWT developers. Those two projects really do all of the work. Hopefully I can help the Jalimo folks update their wiki a bit.
Here is how you can start hacking out your own Java apps on the Nokia n810.
- Install Jalimo using Maemo's point-and-click installer.
- Add the Jalimo repository to Application Manager. Use the following info:
Browse your installable applications and install the ones that say'Jalimo'.
Drop to command-line and type 'cacao'. You'll see the familiar JVM options scroll by. At this point you can run Java apps, but if you want to run Graphical programs, you'll have to include the SWT/GTK libraries in the '/usr/share/java/' folder.
Edit and test code under your favorite IDE. I used Netbeans , and here is what I did.
- Catalog Name: Jalimo
- Web Address: http://jalimo.evolvis.org/repository/maemo/
- Catalog Name: chinook
- Catalog Name: user
Finally, compile your code and copy it over to the n810 via the USB cable. It appears as a regular USB disk, and this step is as easy as copying and pasting.
- Created a new Java Application project.
- Added 'swt.jar' from the Eclipse SWT release (can also copy from the n810 directly).
- Copied and pasted the Jalimo SWT example code.
That is it. Sorry not to include some screenshots, but I'm a bit to excited to hack out some serious code. Perhaps I'll port Tranche to the n810 or maybe I'll try to figure out how to play around with the GPS....