Java and the Nokia N810: A Rich Mobile Platform
Although Nokia doesn't officially support Java development on the N810, it can easily be done. With help from the Jalimo project (jalimo.org), which offers a free Java stack specifically for mobile Linux devices, you can run just about any Java SE 5 application available on this device so long as it fits into its memory and storage profile. It also supports Eclipse SWT to help you build rich GUI applications.
To install Java (technically, the Cacao VM with GNU Classpath), you can use the N810's built-in Application Manager tool. This makes it easy to install, update, or uninstall any Debian-packaged Linux application that is compatible with the N810. To manually configure Application Manager for Jalimo, choose the Application Catalog under the Tools menu and add or create a new catalog with these parameters:
- Catalog name: Jalimo
- Web Address: jalimo.evolvis.org/repository/maemo
- Distribution: chinook
- Component: user
You can install packages that it suggests at that point; remember to include both "jalimo-console-example" and "jalimo-swt-example," because these pull in the needed files to run both command-line and GUI applications, along with the libswt-gtk-3.4-java graphics toolkit. The Cacao VM gets installed in /etc/alternatives, with a link created in /usr/bin so that it's in the path. By default, libraries get installed in /usr/share/java, with configuration files in /usr/share/java-config.
To do real Java development for your N810, connect it to a host computer running Windows, Linux, Solaris, or Mac OS X, and develop with an IDE such as Eclipse or NetBeans. Here, I focus on Eclipse because the Jalimo VM comes with Eclipse SWT support. You can connect the N810 to the host with USB cable. Once connected, the device's internal storage is displayed as an external disk that can be used to transfer files.
However, I found this to be a little constraining. Instead, I prefer to open a terminal session to the device from my host computer. To do this, install the available Maemo OpenSSH package, along with the Maemo PC Connectivity and Development package (maemo.org/downloads/product/OS2008/openssh and http://maemo.org/downloads/product/OS2008/maemo-pc-connectivity, respectively).
Once installed, your device has both a secure shell (SSH) client and server installed, as well as a package that creates a network connection over the USB cable. This is useful when you're out of range from a wireless network, or you want more security. I usually create SSH sessions from my Mac, and perform secure copies (SCP) over my wireless network. With this, I can develop an application on my Mac, SCP the files to the right place on the N810, and then start the application from my Mac's SSH session. Of course, if it's a GUI application, I need to interact with the device once it executes. However, this setup lets me do most of the typing on a full-sized keyboard (see Figure 2).
Keep in mind that Nokia does not recommend installing the packages to gain root access because this can "brick the device," as they say, if you change or overwrite something critical on accident. So be careful! Also, be sure to change the root password to something secure, as it now will be open to attack when on public wireless networks. You can do this with the passwd command.