JDK 9 Support

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

KhamPa
New User
Posts: 1
Joined: Fri Jan 20, 2017 6:35 am

JDK 9 Support

Postby KhamPa » Fri Jan 20, 2017 7:53 am

Hello there.

I've found that some of JDK 9 released. http://openjdk.java.net/projects/jdk9/

As u know new JDK supports AOT compilation that possibly able to improve overall performance of LeJos programs on Ev3.
http://openjdk.java.net/jeps/295
Its supports only java.base right now.
http://download.java.net/java/jdk9/docs ... mmary.html

JDK9 full release planned on JULY 2017.
http://www.theregister.co.uk/2016/09/14 ... ase_delay/
So would LeJos support JDK9?

User avatar
gloomyandy
leJOS Team Member
Posts: 5972
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: JDK 9 Support

Postby gloomyandy » Fri Jan 20, 2017 8:34 am

That document says that AOT compilation is only supported for Linux/x64 systems so is very unlikely to work on the EV3. I'm sure someone will get JDK 9 working on the EV3 but there may be issues due to the rather old version of Linux that is used by LEGO/leJOS. There are also the problems (like with Java 8) of having to take extra steps to generate the JRE on another system rather than having something that can be used directly from the download.
leJOS news https://lejosnews.wordpress.com/

User avatar
esmetaman
Advanced Member
Posts: 361
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: JDK 9 Support

Postby esmetaman » Thu Feb 16, 2017 11:55 pm

With EV3Dev, I am testing the installation of Java 9. At the moment, I could install Java 9, JDK + JRE installing in a manual way all debian packages, but it is possible. When I have more tests, I will inform.

Image

Cheers
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots

User avatar
esmetaman
Advanced Member
Posts: 361
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: JDK 9 Support

Postby esmetaman » Sun Sep 24, 2017 7:59 pm

I am trying to build for EV3 with OpenJ9 a JVM for Java 9 from Eclipse foundation:
http://www.eclipse.org/openj9/

Eclipse OpenJ9 is a high performance, scalable, Java virtual machine (JVM) implementation that represents hundreds of person-years of effort. Contributed to the Eclipse project by IBM, the OpenJ9 JVM underpins the IBM SDK, Java Technology Edition product that is a core component of many IBM Enterprise software products. Continued development of OpenJ9 at the Eclipse foundation ensures wider collaboration, fresh innovation, and the opportunity to influence the development of OpenJ9 for the next generation of Java applications.


More information here:
https://github.com/ev3dev-lang-java/ev3 ... issues/405

Juan Antonio
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots

User avatar
esmetaman
Advanced Member
Posts: 361
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: JDK 9 Support

Postby esmetaman » Mon Jan 08, 2018 11:21 pm

Happy new year!!!

From today, any LeJOS user can install Java 9 in JDK/JRE versions for EV3 Brick:
https://github.com/ev3dev-lang-java/openjdk-9-ev3
https://github.com/ev3dev-lang-java/ope ... 3/releases

Excellent work with the Docker image to cross compile OpenJDK 9 for EV3: @linuxtardis (Jakub Vaněk)

Cheers

Juan Antonio
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots

User avatar
linuxtardis
New User
Posts: 15
Joined: Mon Oct 27, 2014 5:21 am
Location: Czech Republic
Contact:

Re: JDK 9 Support

Postby linuxtardis » Tue Jan 09, 2018 5:21 pm

Hi,

I've been thinking about compiling it for leJOS as well, because the original compiler is available:
https://sourcery.mentor.com/GNUToolchai ... 32.tar.bz2
https://sourcery.mentor.com/GNUToolchai ... nu.tar.bz2
https://sourcery.mentor.com/GNUToolchai ... rc.tar.bz2

It is possible to redistribute OpenJDK in binary form (at least most of the Linux distros do it), so the separate Oracle Java download step might not be needed. Although it is a good idea to isolate the Java runtime package from the rest of the OS.

Jakub Vaněk
#HueHueHue Productions

User avatar
linuxtardis
New User
Posts: 15
Joined: Mon Oct 27, 2014 5:21 am
Location: Czech Republic
Contact:

Re: JDK 9 Support

Postby linuxtardis » Tue Jan 09, 2018 5:23 pm

But I have no idea about the certification needed for a custom build like this. This was the message from Oracle, when they released their Java for EV3:
henrikstahl wrote:Hi all,

In case you aren't aware, we have made a version of Java SE Embedded certified on Mindstorms EV3 available here:
http://java.com/legomindstorms

...

Henrik Ståhl
Vice President, Product Management
Oracle
#HueHueHue Productions

User avatar
esmetaman
Advanced Member
Posts: 361
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: JDK 9 Support

Postby esmetaman » Tue Jan 09, 2018 9:57 pm

I think that Oracle could certificate his own version of Oracle JRE.
For the scenario of a build based on OpenJDK, "the certification" is the usage of the build by the community.

Juan Antonio
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots

User avatar
gloomyandy
leJOS Team Member
Posts: 5972
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: JDK 9 Support

Postby gloomyandy » Wed Jan 10, 2018 2:01 pm

There is a very large and pretty complete test process that Oracle uses to certify a new build. I'm not sure if that is available outside of Oracle, some of it may be. But to be honest I wouldn't worry about it. If it works well enough to be useful then it is probably good enough. Good luck if you go ahead with cross compiling for the EV3/leJOS it is not a trivial process and depends a lot on how well the build system used supports cross compilation. I would hope that for a JRE it will be a relatively straight forward process, but it is not a trivial build what with the JIT and everything. The main problems will be if you hit dependencies on other libs that are not provided in the base image.
leJOS news https://lejosnews.wordpress.com/

User avatar
esmetaman
Advanced Member
Posts: 361
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: JDK 9 Support

Postby esmetaman » Wed Jan 10, 2018 4:25 pm

Hi Andy,

in my tests once I execute this statement:

Code: Select all

java -Xshare:dump


The performance is the same than Oracle JRE8 on EV3. (I am impressed. The results with OpenJDK 8 was poor)
https://github.com/ev3dev-lang-java/jvm-benchmark

This week, I start using the JRE 9 and I didn't find any problem:
https://github.com/ev3dev-lang-java/ope ... 3/issues/5

I will try to test for LeJOS installation process this weekend or next week.
Using a custom image with JRE9 incorporated on LeJOS SD Card could be a very nice improvement for the user experience.

The oracle form is very tedious... When I student from Secondary school has to populate the whole form, many times the student has problem with the field: "Company"...

Anyway, when OpenJ9 will have better CMake support, we should test too but now we have an opportunity to use Java 9 on EV3.

Cheers

Juan Antonio
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots


Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 3 guests