Saturday, January 15, 2011

Install Oracle/Sun Java on the N900...

Officially, the N900 does not have Java pre-installed, and the closes thing to getting Java on the Maemo5 platform was to install IcedTea which is located in the Extras repository at in a package called icedtea6. To know more about the IcedTea project, read more about it at

If you are reading this tutorial to install Sun Java 6 on your N900, you must remember to first remove IcedTea from you device. To do that, just run the Application Manager and remove the package called "icedtea6".

Getting the installer

You will need to go to the Sun Developer Network site and download the Java SE for Embedded 6. You can do that by going to this link.

Download the latest version (currently it's Java SE for Embedded 6 Update 21), agree to their license agreement and select "Linux (ARM)" platform. You will then be asked to select which version of the ARM platform you will be using Java on and you should select the "Headful, EABI, Hard Float (VFP), Little-Endian" variant of the ARM platform. At the time of writing this article, that would be "Java SE for Embedded 6 Update 21 (Build 9) ARMv7 Linux - Headful, EABI, Hard Float (VFP), Little-Endian"

Once you have completed the download, you should get a file called ejre-1_6_0_21-fcs-b09-linux-arm-vfp-eabi-min-27_sep_2010.tar.gz. Proceed by copying this file into the microSD card main/root directory.

You will then need to go to terminal shell and as root (please see my earlier post on how to install and gain root access) do the following:

$ sudo gainroot
# cd /opt/
# tar -zxvf /media/mmc1/ejre-1_6_0_21-fcs-b09-linux-arm-vfp-eabi-min-27_sep_2010.tar.gz

This will extract the tar file's content into a folder called ejre1.6.0_21 in /opt. You will then need to create the necessary symbolic links so that Maemo5 can access the necessary binaries by typing in (again, as root):

# ln -s /opt/ejre1.6.0_21/bin/* /usr/bin/

To test if the installation was done correctly, open a new terminal shell and type:

$ java -version

You should get the response:

Java version "1.6.0_21"
Java(TM) 2 Runtime Environment, Standard Edition for Embedded (build 1.6.0_21-b09)
Java HotSpot(TM) Client VM (build 19.0-b02, mixed mode)

You can now run any Java application on your N900.

Running Java ME applications

If you want to run midp (Java ME application in Java SE) applications, you will need to install a separate application called MicroEmulator which is a Java implementation of Java ME in Java SE. Then you will need to download from here, unzip the file in /opt and you will now have access to thousand of Java midp applications. To run a Java program, go to terminal shell and type:

$ java -jar app.jar

Replace the name app.jar as necessary.


  1. hm.

    that looks cool!

    this EABI is only an evaluation-licence, isn't it?
    i've read, it will expire after 90 days :(

    did anyone know a solution for this?

  2. once i type 'sudo gainroot' and i press enter,it says enable RD mode if you want to break your device...... pls what i'm i soppose 2 do????

  3. u need to install rootsh first, to use this command ;)

  4. Hi thanks for guide where should i put jar files im a beginner lol. Thanks again

  5. works great!
    I use it for one time passwords applikation soft token mobile pass from safeword