status of java on raspbian.


30 posts   Page 1 of 2   1, 2
by plugwash » Tue Jan 01, 2013 1:36 am
There are now quite a few java options for raspbian so I thought i'd sumarise them to help the confused newcomers decided what the best vm is for them.

oracle jdk 7
pros: fast, full-featured
cons: non-foss, free to use for "desktop"/"server" use but requires seperate licensing for embedded use.
notes: included by default in recent versions of the raspberry pi foundation raspbian image.
package name: oracle-java7-jdk (note: package is in raspberry pi foundation repo, not raspbian repo)

zero
pros: full-featured, FOSS
cons: SLOW
notes: default vm in raspbian openjdk packages.
package name for openjdk-7: openjdk-7-jre
package name for openjdk-6: openjdk-6-jre

jamvm
pros: faster than zero, free, seems mature, FOSS
cons: slower in my (probablly highly flawed) test than avian and oracle. Lacks support for agents
package name for openjdk-7: icedtea-7-jre-jamvm
package name for openjdk-6: icedtea-7-jre-jamvm

avian
pros: seems faster than jamvm in my (probablly highly flawed) test, FOSS.
cons: seems very new, not available for openjdk-6, doesn't seem to be as fast as oracle vm in my (probablly highly flawed) test, not sure what if any limitations it has.
package name for openjdk-7: jvm-7-avian-jre

JDK 8 (with JavaFX) for ARM Early Access
pros: seems to be the fastest option, supplied class libraries include accelerated javafx implementation.
cons: propietary, doesn't appear to be redistributable, still prerelease, supplied class libraries are jdk8 based and don't include AWT/swing (though apparently the oracle embedded vm can be used with the class libraries from raspbian openjdk to get AWT/swing support).
forum thread: viewtopic.php?f=81&t=26110

The default vm for openjdk-7 on raspbian can be changed by editing /etc/java-7-openjdk/jvm-armhf.cfg. Presumablly a similar config file exists for openjdk-6 but I haven't checked myself.

edit: incorporated some of hendrik's fixes
edit2: add package name for avian, pointed out as missing by xranby
edit3: add mention of oracle java 7 packages.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by henrik » Tue Jan 01, 2013 6:24 am
oracle embedded JRE preview
pros: seems to be the fastest option, supplied class libraries include accelerated javafx implementation.
cons: propietary, doesn't appear to be redistributable, still prerelease, supplied class libraries are jdk8 based and don't include AWT/swing (though apparently the oracle embedded vm can be used with the class libraries from raspbian openjdk to get AWT/swing support).
forum thread: viewtopic.php?f=81&t=26110


That should be "Oracle JDK 8 preview for Linux/ARM". Our Java SE Embedded products (that you call the embedded JRE) is a commercial variant optimized for low memory footprint.

A few clarifications:
- All implementations use the OpenJDK class libraries, but with different VMs
- OpenJDK is developed by Oracle and other members of the OpenJDK community
- The Oracle JDK is based on OpenJDK, adding a few features that we either don't have the right to open source or that we keep closed for commercial reasons. For now that includes our ARM port of Hotspot, which is highly optimized.
- Oracle JDK binaries undergo extensive testing and are likely the highest quality.
- Oracle JDK is free (as in beer) for most purposes including redistribution with applications, see the license agreement you click through to download JDK 7
- The Oracle JDK 8 preview is under an early access license with more reatrictions
- Using the Swing/AWT libraries from OpenJDK 7 or Oracle JDK 7 with the JDK 8 preview is unlikely to work moving forward, but you can always compile OpenJDK 8 (our binaries and the OpenJDK source are kept in sync)
- JavaFX is partially available open source in the OpenJFX project on java.net, and will be fully open sourced over the next few months (including the ARM port)

Henrik Ståhl
Sr. Director, Product Managament
Java Platform Group, Oracle
Posts: 60
Joined: Tue Dec 18, 2012 4:24 pm
by xranby » Wed Feb 06, 2013 12:40 pm
The new hardfloat fixed CACAO JVM found in the new IcedTea 6 1.12 release work well under Raspbian. We should focus on packaging it.
http://blog.fuseyism.com/index.php/2013 ... -released/

While i know that compilation can be tricky i have prepared a RaspberryPi armhf CACAO libjvm.so that you can use as an drop in replacement into any OpenJDK 6 installation (/usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/server/libjvm.so) This libjvm.so was built using the icedtea6 1.12 release from inside a Raspbian chroot.

The cacao armhf libjvm.so is found here:
http://labb.zafena.se/cacao/armhf-armv6/libjvm.so
if you want to use it in combination with a icedtea 6 openjdk 6 install run:
Code: Select all
sudo apt-get update
sudo apt-get install openjdk-6-jre
wget http://labb.zafena.se/cacao/armhf-armv6/libjvm.so
sudo cp libjvm.so /usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/server/libjvm.so
sudo cp libjvm.so /usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/cacao/libjvm.so
java -version
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by plugwash » Wed Feb 06, 2013 1:57 pm
xranby wrote:The new hardfloat fixed CACAO JVM found in the new IcedTea 6 1.12 release work well under Raspbian. We should focus on packaging it.

Looks like debian already did http://packages.qa.debian.org/o/openjdk ... 4840Z.html

I'll take a closer look when I get some time.

Does this version also contain the fixed jamvm?
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by xranby » Wed Feb 06, 2013 2:19 pm
plugwash wrote:
xranby wrote:The new hardfloat fixed CACAO JVM found in the new IcedTea 6 1.12 release work well under Raspbian. We should focus on packaging it.

Looks like debian already did http://packages.qa.debian.org/o/openjdk ... 4840Z.html

I'll take a closer look when I get some time.

Does this version also contain the fixed jamvm?


Yes both the armhf JamVM and the armhf CACAO are included in this new major 6 release.
Its mentioned in the release log: http://blog.fuseyism.com/index.php/2013 ... -released/
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by plugwash » Wed Feb 06, 2013 6:30 pm
I have split the posts about removing java and java security into their own thread. Please direct all discussion of that issue there not here.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by plugwash » Wed Feb 06, 2013 8:30 pm
xranby wrote:Yes both the armhf JamVM and the armhf CACAO are included in this new major 6 release.
Its mentioned in the release log: http://blog.fuseyism.com/index.php/2013 ... -released/


Unfortunately it seems the new version failed to build on both armel and armhf in debian with different failures. Any thoughts? (i'm trying a build on raspbian anyway but I wouldn't be surprised if it fails too

armel:
libtool: compile: arm-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src -I../../../.. -I../../../../src -I/build/buildd-openjdk-6_6b27-1.12-1-armel-d7BDV2/openjdk-6-6b27-1.12/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12-1-armel-d7BDV2/openjdk-6-6b27-1.12/build/openjdk/jdk/src/share/javavm/export -I/build/buildd-openjdk-6_6b27-1.12-1-armel-d7BDV2/openjdk-6-6b27-1.12/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12-1-armel-d7BDV2/openjdk-6-6b27-1.12/build/openjdk/jdk/src/solaris/hpi/export -I/build/buildd-openjdk-6_6b27-1.12-1-armel-d7BDV2/openjdk-6-6b27-1.12/build/openjdk/jdk/src/share/hpi/export -I../../../../src -I../../../.. -I../../../../src -g -O2 -fno-strict-aliasing -D__ARM__ -D__LINUX__ -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -std=c99 -pedantic -Wall -Wno-long-long -MT asmpart.lo -MD -MP -MF .deps/asmpart.Tpo -c asmpart.S -fPIC -DPIC -o .libs/asmpart.o
asmpart.S: Assembler messages:
asmpart.S:242: Error: selected processor does not support ARM mode `blx exceptions_asm_new_abstractmethoderror'
make[7]: *** [asmpart.lo] Error 1

armhf:
make[1]: Entering directory `/build/buildd-openjdk-6_6b27-1.12-1-armhf-y7c3I9/openjdk-6-6b27-1.12/build'
if [ -e /build/buildd-openjdk-6_6b27-1.12-1-armhf-y7c3I9/openjdk-6-6b27-1.12/build/openjdk.build-ecj/j2sdk-image/bin/java ] ; then \
/build/buildd-openjdk-6_6b27-1.12-1-armhf-y7c3I9/openjdk-6-6b27-1.12/build/openjdk.build-ecj/j2sdk-image/bin/java -Xshare:dump ; \
fi
Loading classes to share ... #
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (os_linux_zero.cpp:270), pid=2433, tid=1090061424
# fatal error: caught unhandled signal 11
#
# JRE version: 6.0_27-b27
# Java VM: OpenJDK Zero VM (20.0-b12 interpreted mode linux-arm )
# Derivative: IcedTea6 1.12.0
# Distribution: Debian GNU/Linux unstable (sid), package 6b27-1.12-1
# An error report file with more information is saved as:
# /build/buildd-openjdk-6_6b27-1.12-1-armhf-y7c3I9/openjdk-6-6b27-1.12/build/hs_err_pid2433.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
#
/bin/bash: line 2: 2433 Aborted /build/buildd-openjdk-6_6b27-1.12-1-armhf-y7c3I9/openjdk-6-6b27-1.12/build/openjdk.build-ecj/j2sdk-image/bin/java -Xshare:dump
make[1]: *** [stamps/add-archive-ecj.stamp] Error 134
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by xranby » Wed Feb 06, 2013 8:56 pm
plugwash wrote:
xranby wrote:Yes both the armhf JamVM and the armhf CACAO are included in this new major 6 release.
Its mentioned in the release log: http://blog.fuseyism.com/index.php/2013 ... -released/


Unfortunately it seems the new version failed to build on both armel and armhf in debian with different failures. Any thoughts? (i'm trying a build on raspbian anyway but I wouldn't be surprised if it fails too

armel:
...
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (os_linux_zero.cpp:270), pid=2433, tid=1090061424
# fatal error: caught unhandled signal 11
#
# JRE version: 6.0_27-b27
# Java VM: OpenJDK Zero VM (20.0-b12 interpreted mode linux-arm )
...


Was this reported from the official armel Debian builders?
having access to the /build/buildd-openjdk-6_6b27-1.12-1-armhf-y7c3I9/openjdk-6-6b27-1.12/build/hs_err_pid2433.log do help if possible.

So this looks like an internal crash inside the ARM32 assembler interpreter port that is an extension on top of zero for ARM OR the generic OpenJDK zero vm (they both use unfortunately the same version number string when run on hardware without Thumb2). These bugs are hard to track down, usually happens inside the 10K line handwritten ARM assembler interpreter addon for Zero.

If the bug is persistent then A) try switch the default JVM powering OpenJDK6 used by the buildd to JamVM.
(edit /etc/java-6-openjdk/jvm-armhf.cfg on the builder and make sure
-jamvm KNOWN
is on the top)

or B) disable zero for the build edit the debian rules for armel and armhf and make jamvm the default jvm. it might be a problem with Zero for the 6 1.12 release because Oracle do not test Zero at all, for what I know, in OpenJDK upstream and the IcedTea release team only got limited testing of zero on different platforms. So the safest bet is to disable Zero.

All in all I will try reproduce and if I can reproduce it then file a bugreport with the IcedTea team.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by plugwash » Thu Feb 07, 2013 4:08 am
The "# A fatal error has been detected by the Java Runtime Environment:" was from debian armhf, build log at https://buildd.debian.org/status/fetch. ... 1359686380

I've just confirmed that raspbian fails in the same way as debian armhf. The error log file is at http://plugwash.raspbian.org/hs_err_pid ... spbian.log

I'll be fililng a bug report with debian once i've reproduced the bug on it and got the errror log file.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by plugwash » Thu Feb 07, 2013 4:34 am
Looks like 1.12.1 just hit sid, waiting to see if that fails too.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by xranby » Thu Feb 07, 2013 12:31 pm
plugwash wrote:Looks like 1.12.1 just hit sid, waiting to see if that fails too.

looks promising:
https://buildd.debian.org/status/packag ... =openjdk-6 Debian armhf build sucess using IcedTea6 1.12.1

armel still fail to build because Debian soft-float armel target armv4t while the CACAO assembler part of the code used a BLX armv5+ instruction. This is easily fixed the key is to replace the
BLX ...
with a
mov PC, LR
BX ...
instruction pair, BLX is only a compact assembler instruction found in armv5 and later to do a backup of the PC register into the LR and branch using the same instruction. This needs to be fixed with cacao upstream. And nothing for Raspbian to worry about since we target armv6 that include BLX!
Code: Select all
make[7]: Entering directory `/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/cacao/cacao-68fe50ac34ec/src/vm/jit/arm'
/bin/bash ../../../../libtool   --mode=compile arm-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src -I../../../.. -I../../../../src -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/share/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/hpi/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/share/hpi/export -I../../../../src -I../../../.. -I../../../../src -g -O2 -fno-strict-aliasing -D__ARM__ -D__LINUX__ -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -std=c99 -pedantic -Wall -Wno-long-long  -MT asmpart.lo -MD -MP -MF .deps/asmpart.Tpo -c -o asmpart.lo asmpart.S
/bin/bash ../../../../libtool --tag=CC   --mode=compile arm-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src -I../../../.. -I../../../../src -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/share/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/hpi/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/share/hpi/export -std=c99 -pedantic -Wall -Wno-long-long  -D__ARM__ -D__LINUX__ -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_REENTRANT -g -O2 -fno-strict-aliasing -MT emit.lo -MD -MP -MF .deps/emit.Tpo -c -o emit.lo emit.c
libtool: compile:  arm-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src -I../../../.. -I../../../../src -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/share/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/javavm/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/solaris/hpi/export -I/build/buildd-openjdk-6_6b27-1.12.1-1-armel-MmogaA/openjdk-6-6b27-1.12.1/build/openjdk/jdk/src/share/hpi/export -I../../../../src -I../../../.. -I../../../../src -g -O2 -fno-strict-aliasing -D__ARM__ -D__LINUX__ -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -std=c99 -pedantic -Wall -Wno-long-long -MT asmpart.lo -MD -MP -MF .deps/asmpart.Tpo -c asmpart.S  -fPIC -DPIC -o .libs/asmpart.o
asmpart.S: Assembler messages:
asmpart.S:242: Error: selected processor does not support ARM mode `blx exceptions_asm_new_abstractmethoderror'
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by plugwash » Thu Feb 07, 2013 10:41 pm
xranby wrote:This needs to be fixed with cacao upstream. And nothing for Raspbian to worry about

While it's not directly relavent to raspbian having the package stay in good shape on debian armel is probablly a good thing for us.

I may try and whip up a patch, is there a preferred way of selecting arm version specific code within the cacao codebase?

Getting back onto the subject of raspbian i've just built the new openjdk-6 successfully for raspbian. I will then run some basic tests.

Do you have any information on pros/cons of cacao vs zero, jamvm and avian?

Note: since this discussion is getting a bit long I may split it off into it's own thread later, please don't take offense if I do.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by plugwash » Fri Feb 08, 2013 12:11 pm
Ok the new version of openjdk-6 including a working cacao is now in raspbian.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by xranby » Wed May 29, 2013 11:19 am
JDK 7 Update 40 Early Access Release Build b26 May 23, 2013 with ARM hard-float support is now available under the Pre-Release Software Evaluation Agreement license.
https://jdk7.java.net/download.html

This EA build is based on the OpenJDK 7 jdk7u project source + Oracle's closed source ARM JIT that will become the next general avail, GA, release at the end of August 2013:
http://openjdk.java.net/projects/jdk7u/ ... /7u40.html
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by xranby » Mon Jun 17, 2013 5:07 pm
In-order to use the alternative JVMs such as JamVM, CACAO and Avian in combination with OpenJDK pass the jvm name as the first argument on the command line to java; example:
java -jamvm -version
java -cacao -version
java -avian -version

You can set the default to use for OpenJDK 6 by editing the
/etc/java-6-openjdk-armhf/jvm-armhf.cfg

You can set the default to use for OpenJDK 7 by editing the
/etc/java-7-openjdk-armhf/jvm-armhf.cfg

The alternative OpenJDK JVM are installed under /usr/lib/jvm/java-7-openjdk-armhf/jre/lib/arm under a folder named after the respective alternative JVM. The jre/lib/jvm.cfg tells the OpenJDK installation which folders are valid JVM names.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by henrik » Wed Sep 11, 2013 12:36 am
Oracle JDK 7 with hardfloat support (for Raspbian) is now GA, available here:
http://www.oracle.com/technetwork/java/ ... index.html

Henrik (Oracle Java team)
Posts: 60
Joined: Tue Dec 18, 2012 4:24 pm
by plugwash » Wed Sep 11, 2013 10:09 am
hmm, in the list of downloads I see an "armv7" hard float abi and an "armv6/armv7" soft float abi but no armv6 hard float abi version.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by henrik » Wed Sep 11, 2013 2:48 pm
Docs error, will fix. Should be ARMv6/7.
Posts: 60
Joined: Tue Dec 18, 2012 4:24 pm
by mcgyver83 » Fri Oct 11, 2013 2:30 pm
I installed oracle jdk 8 to use hardfloat.
Now I red on the rpi site that jdk 7 is now ready for arm with hardfloat.
I follwed the instructions on the site, sudo apt-get install oracle-java7-jdk but the jdk8 is still
alive.
How can I un'install it?
Posts: 296
Joined: Fri Oct 05, 2012 11:49 am
by freedomotic » Fri Nov 15, 2013 11:11 am
Hi all,
a quick question: is the jdk version in raspbian (last available image) hardfloat?
Thanks
Freedomotic Open Source Building Automation
http://freedomotic.com
User avatar
Posts: 137
Joined: Sat Apr 21, 2012 3:59 pm
Location: Italy
by xranby » Fri Nov 15, 2013 11:17 am
freedomotic wrote:Hi all,
a quick question: is the jdk version in raspbian (last available image) hardfloat?
Thanks


Yes
(all raspbian images are using the hardfloat ABI, and the JVM is using the hardfloat ABI)
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by mcgyver83 » Fri Nov 15, 2013 12:55 pm
So which JVM is suggested as faster on the rasp?
Posts: 296
Joined: Fri Oct 05, 2012 11:49 am
by xranby » Fri Nov 15, 2013 1:58 pm
mcgyver83 wrote:So which JVM is suggested as faster on the rasp?


If you design a graphical application then the most important choice on the Raspberry Pi is to pick an API that can take advantage of the Broadcom VideoCore GPU graphics processor.
The PI CPU runs at 175MFlops while the GPU runs at: 2600MFlops thus picking the right API makes up to 15 times performance difference! Also the JVM running on the CPU will handle events such as input better if all graphics rendering is offloaded to the GPU.
http://elinux.org/Raspberry_Pi_VideoCore_APIs

The fastest closed source JVM is Oracles JDK7 & JDK 8 Hotspot JVM.

The fastest Open Source JVM are:
JamVM for OpenJDK 8.
Cacao / Avian for OpenJDK 7.

The most stable Open Source JVM is all around JamVM.
Zero JVM is also stable although it is known to be quite slow on the Pi.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by plugwash » Fri Nov 15, 2013 3:50 pm
mcgyver83 wrote:So which JVM is suggested as faster on the rasp?

Afaict the oracle VM is the fastest if you are prepared to accept it's license.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm
by henrik » Fri Nov 15, 2013 4:51 pm
plugwash wrote:
mcgyver83 wrote:So which JVM is suggested as faster on the rasp?

Afaict the oracle VM is the fastest if you are prepared to accept it's license.


That sounds a bit scary scary, so let's be clear. It's the same "free-as-in-beer" license (for usage and redistribution for most use cases you can think of) that we use for desktop and normal server-side Java. No developer or hobbyist should be remotely concerned about accepting it.

Full text (long because it allows you a lot of freedoms):
http://www.oracle.com/technetwork/java/ ... index.html

Previous discussion in this forum:
viewtopic.php?p=401112
viewtopic.php?p=236983

FAQ on the original (soft float) Oracle JDK for ARM:
https://blogs.oracle.com/henrik/entry/o ... _for_linux

Relevant text from FAQ:

Is the ARM JDK free (gratis) or does it require a commercial license?

"Like all general-purpose JDK and JRE binaries, the ARM JDK is free for development and production use on general-purpose hardware, and can be redistributed for free with applications targeting a general-purpose computer. See the end-user license for the exact license grants & restrictions. To take a couple of examples, an ARM server deployed in your datacenter running Tomcat or Glassfish is general-purpose, as is a Raspberry Pi board when you use it like a PC. An industrial controller or a kiosk appliance is not general purpose, and both would require a commercial license."

Henrik Stahl, VP Product Management, Java, Oracle
Posts: 60
Joined: Tue Dec 18, 2012 4:24 pm