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
/opt directory 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 rootsh from the maemo-extras repository 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
/opt/OpenJDK-camswl/bin to PATH.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 !
●๋•‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗●๋•

2 comments:
With your permission I would like to post these instructions on my Nokia N900 website. Once Java is installed, what can be done with it? Are you going to have a follow up post?
My Nokia N900: okay, you can post it in your website.
Here we are installing the JDK, so we can develop programs written using the Java programming language right from the phone itself. Also, we can run any other java applications since we have the JRE. We can install other JVM languages like Clojure as well.
I will expand on this in another post if it gets interesting.
Post a Comment