coffeeaddict
Posts: 1
Joined: Thu Jul 18, 2019 5:42 am

Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Jul 18, 2019 5:48 am

Hello,

I was assigned a class project that's asking me to get an audio player to work with Rasbperry Pi, Java and Arm Jazelle technology. I have been reading here and there trying to understand what Jazelle is and how to get Java working on Rasbperry using it. Everything is still a bit unclear to me. I would like to get a simple explanation of the things above and a few starting points if possible.

Thanks,
AA

ag123
Posts: 18
Joined: Sun Dec 18, 2016 7:54 am

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Jul 18, 2019 8:53 am

Jazelle has little if anything to do with java from an 'end user' perspective
https://en.wikipedia.org/wiki/Jazelle
you can run java apps on Rpi so long as you install a JVM on it.
https://elinux.org/RPi_Java_JDK_Installation

and java isn't really an easy platform to deal with 'low level' stuff such as direct hardware interfaces.
but accordingly java sdk may have a sound api
https://docs.oracle.com/javase/tutorial ... index.html
https://docs.oracle.com/javase/7/docs/t ... tents.html
i've not tried them myself and do not know if both the openjdk and oraclejdk works well with sound api on Rpi

Heater
Posts: 13267
Joined: Tue Jul 17, 2012 3:02 pm

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Jul 18, 2019 12:56 pm

coffeeaddict,

Jazelle is an instruction set included in some ARM processors that executes Java byte codes directly rather than have a Java Virtual Machine interpret or compile Java bytecodes to regular ARM instructions.

As far as I can make out Jazelle is obsolete old technology that ARM has dropped from recent processors.
Somone correct me if I am wrong.

I suspect there is no way to make use of Jazelle from Raspbian as it requires executing code in a special mode that the kernel will not allow.

All in all I think it's insane for you to be set this as any kind of class exercise.

Have a google for "Raspberry Pi Jazelle". Quite a few people have written in blogs and such about it.

User avatar
Paeryn
Posts: 2657
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Jul 18, 2019 3:18 pm

Heater wrote:
Thu Jul 18, 2019 12:56 pm
Jazelle is an instruction set included in some ARM processors that executes Java byte codes directly rather than have a Java Virtual Machine interpret or compile Java bytecodes to regular ARM instructions.

As far as I can make out Jazelle is obsolete old technology that ARM has dropped from recent processors.
Somone correct me if I am wrong.

I suspect there is no way to make use of Jazelle from Raspbian as it requires executing code in a special mode that the kernel will not allow.

All in all I think it's insane for you to be set this as any kind of class exercise.

Have a google for "Raspberry Pi Jazelle". Quite a few people have written in blogs and such about it.
Only the RPi 0 and 1 have anything other than a trivial (where all byte codes will trigger a trap to be implemented in software) Jazelle. How much the Arm1176 implements in hardware is unknown, as far as I'm aware there is no public documentation.
She who travels light — forgot something.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Wed Sep 04, 2019 10:42 am

I'm looking at this too, but more from a "compile my own OS and Java" point of view, here's how far I got:

You can download the sources for Java ME 1.1 (CLDC KVM) on this page: https://www.oracle.com/technetwork/java ... 19430.html

Minix has been ported to BeagleBone and then there was an attempt to port Minix 3 to RPi 1 but when RPi 2 came that development stopped because the RPi 2 has the same processor as the BeagleBone so it worked already:

https://github.com/arldeng/Minix3-RPI
https://github.com/NovaMinix3/rpi_b

I'm now trying to compile Minix 3 and Java ME to the ARMv6 of the RPi Zero (I need to use that form factor, eventually the foundation might release an ARMv7 or 8 Zero so I'm not going to work too hard on the ARMv6 port but just get the compilation working to learn a little)

I think you need to have the interpretation in hardware for Jazelle to work well, but then the spec. for the Java version and features will have to be set in stone forever! I think this might happen eventually but hopefully the Jazelle stuff gets released before that so we can port them into the Java ME 1.1 source linked at the top.
Last edited by bullen on Thu Sep 05, 2019 1:23 pm, edited 3 times in total.
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

Heater
Posts: 13267
Joined: Tue Jul 17, 2012 3:02 pm

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Sep 05, 2019 12:57 pm

bullen,

Is there any particular reason you want to use obsolete hardware technology and old deprecated software with no support or security updates from 2013?

And what is a "Java POW" anyway? Google is not helping me there.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Sep 05, 2019 1:22 pm

Because if I can learn it and compile it myself I can also improve it.

Image

I need to use the Zero because it's small and consumes relatively (compared to the Banana Pi M2 Zero) little energy.
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

hippy
Posts: 5933
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Sep 05, 2019 1:34 pm

bullen wrote:
Wed Sep 04, 2019 10:42 am
hopefully the Jazelle stuff gets released
That seems unlikely. ARM have never been that forthcoming about Jazelle and it is, as noted, old and deprecated technology.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Thu Sep 05, 2019 3:17 pm

Eventually all secrets are known.
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

Return to “Java”