Channels ▼
RSS

Open Source

Java and the Nokia N810 Internet Tablet

Source Code Accompanies This Article. Download It Now.


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).

[Click image to view at full size]

Figure 2: The N810 has a backlit, full QUERTY keyboard that slides out from underneath.

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.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video