Java 7 (OpenJDK/IcedTea) for the BUG 2.0
NOTE: this post was originally at http://community.buglabs.net/kgilmer/posts/251-Java-7-OpenJDK-IcedTea-for-the-BUG-2-, however the webserver seems only intermittently available so I’m moving the post here.
For anyone interested in Java 7, I have built OpenJDK 7 (via IcedTea) for BUG 2.0 (Angstrom, armv7, Zero VM). The binaries are available here. The binaries are not provided as Angstrom opkgs, so the installation process is manual. This is because it was built natively on a BUG, rather than using the OpenEmbedded cross compiling build system. You’ll also need to install libcups2 via opkg if you want to replace the Java 6 JRE to run BUG applications. Here is my installation steps, assuming the j2re-image tarball is decompressed in /home/root:
$ mkdir -p /usr/lib/jvm/java-7-openjdk/jre
$ mv ~/j2re-image/* /usr/lib/jvm/java-7-openjdk/jre
$ rm /usr/bin/java
$ ln -s /usr/lib/jvm/java-7-openjdk/jre/bin/java /usr/bin/java
$ opkg install libcups2
Now if you restart Felix (via Knapsack if you are running a 3.0 release), you’ll notice that the JVM running is java.runtime.version = 1.7.0_147-icedtea-b147 via http://bug/support.html. This is provided on an experimental basis and I would not be surprised if problems pop up!
An interesting benefit that IcedTea 7 provides (other than ARM compatibility via Zero) is alternative VM implementations CACAO and JamVM. The binary build I have provided unfortunately does not include these but I’m going to try and build them. Hopefully I can get Zero, Shark, CACAO, and JamVM all happily living inside the BUG! 🙂
Special thanks to firstname.lastname@example.org#openjdk for his invaluable assistance!