Java platform is an amazing environment. We have the JRE with the JVM and the libraries, and of course with Java and a whole bunch of JVM languages like Clojure, Groovy, Scala etc. To develop applications in Java we need the Java Standard Development Kit (JDK) which contains the compiler and the supporting files. The cool thing about Maemo is that we can install JDK compiled for the ARM architecture.
The easiest way is to install the IceTea6 version of the OpenJDK preset at the maemo repository.
To manually install, follow the steps below.
1. Get OpenJDK for ARM. Cambridge Software Labs (link down) provides optimized version of OpenJDK for ARM. Download OpenJDK v1.6.0_0. (Mirror).
2. Copy the archive to
/optdirectory of the phone. Say you have downloaded or copied the file to
MyDocs/tmp, then run the below command to copy it to
/opt. We need to be root to preform the following operations. Install
maemo-extrasrepository to get root privilege, if not done already.
cd #home dir sudo cp MyDocs/tmp/OpenJDK-camswl.tar.gz /opt #copy file3. Extract the archive.
cd /opt sudo tar zxvf OpenJDK-camswl.tar.gz #extract the archive sudo rm OpenJDK-camswl.tar.gz #delete the archive4. Add
cd /etc sudo vim profile #open the fileAdd the line to the file after the already present export path statement, save and exit vim (:wq). The file will look like:
# ... export PATH="/usr/bin:/bin" #JDK export PATH=$PATH:/opt/OpenJDK-camswl/bin # ...5. Exit and relaunch the terminal.
6. Test the installation by typing in the following commands.
java -version #prints java version "1.6.0_0" javac -version #prints javac 1.6.0_0 javap java.util.Date #lists all methods in Date classHappy hacking !