HomeThe Bluewater BlogJava on Quickstart Kit

Java applications are platform independent.  This means that a Java class file can be run on either a desktop PC or an embedded ARM platform without needing to be recompiled.  This can reduce development time greatly since an application can be developed on a standard desktop PC and then re-deployed on an embedded ARM platform with little or no extra effort. The main page for embedded Java development is: http://java.sun.com/javase/embedded/. Java SE 6 is unfortunately only supported on ARM v6 or higher.  However, Java 1.4.2 is supported on our ARM v5 based Quickstart Kit. Sun are expecting to release a version of Java SE 6 with support for ARM v5 processors by the end of August. The embedded version of Java 1.4.2 is only 25MB when installed and can run on devices with as little as 32MB of memory.  The embedded Java version of Java 1.4.2 is a full J2SE implementation except that it is "headless", which means that there is no support for mice, keyboards or framebuffer devices. To download the Java 1.4.2 run-time for use on Bluewater's Quickstart Kit:

  1. Go to http://java.sun.com/javase/downloads/embedded.jsp
  2. Under "Java SE for Embedded 1.4.2", "ARM Linux - Headless" select "EABI, glibc 2.4, Soft Float"
  3. Fill out the survey and provide an email address
  4. You will be sent an email with a link to a download
  5. Download the archive
  6. The archive can be installed by simply unpacking it to a convenient location (for example, /local/java)
To create a simple hello world application, creae a file called Hello.Java with the following contents:

public class Hello {

public static void main(String args[]) {

System.out.println("Hello World from Java on the Quickstart Kit");

}

}

To compile this you need to have the Java SDK installed on your PC.  The file Hello.class can be built as follows:

javac Hello.java

You can then run this on either your PC, or on Bluewater's Quickstart Kit.  On the Quickstart Kit you will need to supply a classpath which includes both the Java installation directory and the path for your hello world class file.  For example, if you have the embedded ARM Java run-time installed in /local/java, and your Hello.class file in is /home/ryan/java then you can run it as follows:

java -classpath /local/java/lib:/home/ryan/java Hello

If all goes well, you should see the output of the hello world program.