davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Good news on the ARM Java front

Fri Feb 24, 2012 10:02 am

It is reported that HotSpot (the Java JIT compiler) has been ported to ARM.  I am not quite sure which ARM version it is relevant to, and it is only Java-6 not Java-7, but every little helps.

The work is linked to at the bottom of:-

http://overholt.ca/wp/?p=355

If they can get Eclipse working then almost any Java app will run.  Although whether Eclipse would ever run on a Pi is a different question given the limited memory on the Pi.

User avatar
crundy
Posts: 310
Joined: Fri Aug 12, 2011 7:47 am

Re: Good news on the ARM Java front

Fri Feb 24, 2012 10:19 am

Yeah I think Eclipse is too heavy for the Pi, but there are loads of other java IDEs.

Great news on the Java front though. I wonder if we could get LibGDX working on the Pi?

User avatar
alexandru.cucu
Posts: 75
Joined: Mon Sep 05, 2011 6:07 pm
Contact: Website

Re: Good news on the ARM Java front

Fri Feb 24, 2012 10:20 am

Raspberry Pi - Debian 6 image:

$ aptitude show openjdk-6-jre

Package: openjdk-6-jre
New: yes
State: not installed
Version: 6b18-1.8.10-0+squeeze2
Priority: optional
Section: java
Maintainer: OpenJDK Team <openjdk@lists.launchpad.net>
Uncompressed Size: 852 k
Depends: openjdk-6-jre-headless (>= 6b18-1.8.10-0+squeeze2), libasound2 (>
1.0.18), libc6 (>= 2.4), libgcc1 (>= 1:4.4.0), libgif4 (>= 4.1.4),
libjpeg62 (>= 6b1), libpng12-0 (>= 1.2.13-4), libpulse0 (>= 0.9.21),
libx11-6, libxext6, libxi6, libxrender1, libxtst6, zlib1g (>= 1:1.1.4),
libaccess-bridge-java-jni
Recommends: ttf-dejavu-extra
Suggests: icedtea6-plugin
Conflicts: icedtea-gcjwebplugin (< 1.0-1ubuntu4), openjdk-6-dbg (< 6b17~pre3-1),
openjdk-6-demo (< 6b17~pre3-1), openjdk-6-doc (< 6b17~pre3-1),
openjdk-6-jdk (< 6b17~pre3-1), openjdk-6-jre-headless (<
6b17~pre3-1), openjdk-6-jre-lib (< 6b17~pre3-1), openjdk-6-jre-zero
(< 6b17~pre3-1), openjdk-6-source (< 6b17~pre3-1)
Replaces: openjdk-6-jdk (< 6b18-1.8.2-3), openjdk-6-jre-headless (< 6b16~pre3)
Provides: java-runtime, java2-runtime, java5-runtime, java6-runtime
Description: OpenJDK Java runtime, using Hotspot Zero
Full Java runtime environment - needed for executing Java GUI and Webstart
programs. Using Hotspot Zero. The packages are built using the IcedTea build
support and patches from the IcedTea project.
Homepage: http://openjdk.java.net/
https://launchpad.net/~alexandru.cucu

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Good news on the ARM Java front

Fri Feb 24, 2012 10:53 am

No, thats the old HotSpot Zero, rather than full HotSpot.  It obviously has not reached the Debian builds yet.

bbramble
Posts: 60
Joined: Wed Jan 04, 2012 4:10 pm

Re: Good news on the ARM Java front

Fri Feb 24, 2012 11:52 am

Well, eclipse runs under emulation in 200Mb. It's understandably slow and using about 58% of ram without anything loaded, but it shows serious packages should run.

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: Good news on the ARM Java front

Fri Feb 24, 2012 12:38 pm

The ARM core that is included in the SoC explicitly contains Java acceleration in the form of Jazelle (the 'J' letter in the code name).

You can read more about it here: http://en.wikipedia.org/wiki/Jazelle

I'm pretty sure if you want to use it to accelerate your JVM you need to pay a license to...someone. Does anyone from the foundation know about this?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22749
Joined: Sat Jul 30, 2011 7:41 pm

Re: Good news on the ARM Java front

Fri Feb 24, 2012 1:30 pm

Nope. The people who need to know about it (I think) are the people writing the Java stack. Which isn't us.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Good news on the ARM Java front

Fri Feb 24, 2012 1:31 pm

None of the open source JVMs use Jazelle because its details are only available under NDA, and because it has now been deprecated in new designs in favour of Thumb2EE which is not present on the RPi's CPU.

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: Good news on the ARM Java front

Fri Feb 24, 2012 1:47 pm

JamesH said: 


Nope. The people who need to know about it (I think) are the people writing the Java stack. Which isn't us.


Ah yes this is what I thought could be the case. Are there closed-source JVMs which are free for people to access which use Jazelle? (eg something from Sun/Oracle)

chrisg
Posts: 27
Joined: Wed Sep 21, 2011 6:41 pm
Location: Epsom, Surrey

Re: Good news on the ARM Java front

Fri Feb 24, 2012 1:59 pm

The presentation linked says the new JIT generates Thumb2, and falls back to interpreting on platforms where this isn"t supported – unfortunately including the Raspberry Pi.

Edit: Possibly wrong about this. Ed"s port used as the basis for this work was for Thumb2, but it"s not clear to me from the slides if that is still the case. Does anyone know?

TomJoad
Posts: 2
Joined: Thu Mar 08, 2012 11:58 am

Re: Good news on the ARM Java front

Thu Mar 08, 2012 12:07 pm

I don't know much about JIT or the inner workings of the JVM, but what's wrong with using Oracle's JVM in for RasberryPi? After all, they have an embedded version just for smaller devices over here: http://www.oracle.com/technetw.....index.html

This type of server cluster is what I really want to do someday: https://blogs.oracle.com/jtc/entry/tomcat_micro_cluster

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Good news on the ARM Java front

Thu Mar 08, 2012 12:31 pm


TomJoad said:


I don't know much about JIT or the inner workings of the JVM, but what's wrong with using Oracle's JVM in for RasberryPi? After all, they have an embedded version just for smaller devices over here: http://www.oracle.com/technetw.....index.html

This type of server cluster is what I really want to do someday: https://blogs.oracle.com/jtc/entry/tomcat_micro_cluster


Does not help as much as you might think unfortunately.  The only ARM V6 (which is what the RPi is) ones are headless, not headful.  The difference is that the headless ones are for servers (which is what you want to do with it but not what most people would want) as they have no UI support, for that you need a headful one and those are ARM V7 only according to that web site.


TomJoad
Posts: 2
Joined: Thu Mar 08, 2012 11:58 am

Re: Good news on the ARM Java front

Thu Mar 08, 2012 6:40 pm

You're right -- I didn't even notice that it was headless.

So is there a current (Java 6 or Java 7) headful JRE available for RPi? Throwing around Hotspot, Jazelle, etc. has only confused me on the subject.

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Good news on the ARM Java front

Thu Mar 08, 2012 6:51 pm

There is an OpenJDK for 6 and 7 on Debian for armel, no Hotspot, but its there.

dymka
Posts: 1
Joined: Tue Jan 17, 2012 8:35 am
Contact: Website

Re: Good news on the ARM Java front

Fri Mar 09, 2012 10:21 am

davidgoodenough said:


TomJoad said:


I don't know much about JIT or the inner workings of the JVM, but what's wrong with using Oracle's JVM in for RasberryPi? After all, they have an embedded version just for smaller devices over here: http://www.oracle.com/technetw.....index.html

This type of server cluster is what I really want to do someday: https://blogs.oracle.com/jtc/entry/tomcat_micro_cluster


Does not help as much as you might think unfortunately.  The only ARM V6 (which is what the RPi is) ones are headless, not headful.  The difference is that the headless ones are for servers (which is what you want to do with it but not what most people would want) as they have no UI support, for that you need a headful one and those are ARM V7 only according to that web site.



So it does mean that we are able to use Java SE for Embedded 7 for ARM v6 for applications that do not require UI/AWT, doesn't it?

serdaroquai
Posts: 1
Joined: Fri Mar 16, 2012 8:18 am

Re: Good news on the ARM Java front

Fri Mar 16, 2012 8:31 am

TomJoad said:



So is there a current (Java 6 or Java 7) headful JRE available for RPi?


I second this question. I want to use java.awt.Robot on RPi, is it not possible?

nickorossa
Posts: 71
Joined: Wed Mar 14, 2012 12:42 pm
Location: Swindon, UK, Planet Earth.

Re: Good news on the ARM Java front

Mon Mar 19, 2012 6:10 pm

Hi

I'd like to know the answer too as it saves me learning a new language. As long as the java runtime has network support that will do for one of my projects.

Thanks.

Nick.

User avatar
mkopack
Posts: 242
Joined: Mon Nov 07, 2011 8:46 pm

Re: Good news on the ARM Java front

Mon Mar 19, 2012 6:51 pm

OpenJDK 6 WILL run on the RPi (I managed to get it installed under the QEMU Rpi emulation.)

So as long as you stick to JDK 6 you're fine.

There's no Open JDK7 yet for ARM.

As others have said, currently the full HotSpot JVM is NOT supported. But there is at least HotspotZero.

And just because Eclipse can run doesn't mean "anything" will.... Yes, Eclipse is a pretty big Java app, but that doesn't make it the perfect test...

Return to “General discussion”