Java 8 not yet supported

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

Moderators: roger, gloomyandy, skoehler

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Java 8 not yet supported

Postby skoehler » Wed Mar 19, 2014 7:02 pm

Java 8 is not yet supported by leJOS. But we're working on it.

For the time being, please download Java SE embedded version 7 from here:
http://www.oracle.com/technetwork/java/ ... index.html

Download the file called ejre-7u51-fcs-b13-linux-arm-sflt-headless-18_dec_2013.tar.gz (ARMv5 Linux - Headless EABI, SoftFP ABI, Little Endian).
It's the last ARM build in the list.

gabrielsan
New User
Posts: 1
Joined: Thu Apr 17, 2014 2:10 am

Re: Java 8 not yet supported

Postby gabrielsan » Thu Apr 17, 2014 2:14 am

Hi skoehler,

I've just flash my NXT and got HelloWord on it.

I did't noticed this topic before installing java on my w7. I downloaded the last release from java "jdk1.8.0_05"

I compiled and downloaded it to the nxt ( lejos 0.9) with sucess.

Should I unistall it and install jdk1.7 as ou mentioned?

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Re: Java 8 not yet supported

Postby skoehler » Thu Apr 17, 2014 2:16 am

gabrielsan wrote:Hi skoehler,

I've just flash my NXT and got HelloWord on it.

I did't noticed this topic before installing java on my w7. I downloaded the last release from java "jdk1.8.0_05"

I compiled and downloaded it to the nxt ( lejos 0.9) with sucess.

Should I unistall it and install jdk1.7 as ou mentioned?

This thread is about the EV3, not the NXT. Using Java 8 with leJOS NXJ is OK.

ryangardner
New User
Posts: 6
Joined: Sat Jun 21, 2014 12:41 pm

Re: Java 8 not yet supported

Postby ryangardner » Sat Jun 21, 2014 12:51 pm

Is there a discussion on what work is needed to get java 8 to work on the ev3?

I'm very experienced in java, but new to lejos.

If there's some specific issues that need attention, I might be able to help out.

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

Re: Java 8 not yet supported

Postby gloomyandy » Sat Jun 21, 2014 1:12 pm

The next release will support Java 8 (already there in git master). But the JRE side of things is rather complex. We are talking with Oracle to make it easier for leJOS users. What Java 8 features are you looking for?

ryangardner
New User
Posts: 6
Joined: Sat Jun 21, 2014 12:41 pm

Re: Java 8 not yet supported

Postby ryangardner » Sat Jun 21, 2014 5:56 pm

Lambdas are the main java 8 feature I'm interested in.

I was going to start poking around and see if I could get some of the sensor stuff to have a streaming api or poke around with some of the APIs and see where some of the interfaces could be refactored to make sense as functional interfaces (so they could be implemented in lambdas).

If nashorn was on there, I was going to poke around with the javascript a bit too.

jbenech
New User
Posts: 4
Joined: Sat Jan 31, 2015 4:50 pm

Re: Java 8 not yet supported

Postby jbenech » Thu Mar 05, 2015 8:10 pm

Hello,

For my project (http://jbenech.github.io/gnikrap/) , I am really interested by the javascript part of Java8 which is a completely new implementation.
The reason are:
    * I have made some benchmark on the EV3 and the same script interpreted in by JRE8 is two time faster than the same script interpreted by JRE7.
    * The "integration" of Javascript within Java is far more advanced in JRE8 (typically, you can access to the value of a Map by doing myMap.myKey while in JRE7 you have to do myMap.get("myKey").)

Regards,
Jean.

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

Re: Java 8 not yet supported

Postby gloomyandy » Thu Mar 05, 2015 9:16 pm

java 8 works fine in 0.9.0 but there is no easy way at the moment to create the required JRE and use it. If you understand Java and Linux and you want to use Java 8, I'm sure you can work it out. If not then best to wait until we either document the process or provide a mechanism to do it automatically.

AlanG
Novice
Posts: 28
Joined: Wed May 21, 2014 10:02 pm

Re: Java 8 not yet supported

Postby AlanG » Wed Mar 25, 2015 6:58 pm

gloomyandy,

I've been keeping up with Oracle's web page that covers the Java SE Embedded downloads:
http://www.oracle.com/technetwork/java/ ... 09751.html

Most recently, I have downloaded the latest Java 7 SE Embedded release (update 75) that's targeted for the EV3's ARM9 processor:
ejre-7u75-fcs-b13-linux-arm-sflt-headless-18_dec_2014.tar.gz
Once I copied that file onto the Windows partition of my EV3's SD card, and booted my EV3, Linux recognized and loaded the new Java version.

Now, Oracle's web page says:
"Note: Java SE Embedded 8 enables developers to create customized JREs using the JRECreate tool. Starting with Java SE Embedded 8, individual JRE downloads for embedded platforms are no longer provided. To get started, download an eJDK bundle suitable for your target platform and follow instructions to create a JRE that suits your application's needs. This change does not affect JRE downloads for Java SE Embedded 7 Update releases." The instructions for using JRECreate are on:
http://docs.oracle.com/javase/8/embedde ... m#JEMAG270

I have downloaded what appears to be the correct EJDK for the EV3's ARM9 and Linux: ejdk-8u33-fcs-linux-arm-sflt.tar.gz

So, it looks to me like I should:
1. Do a JRECreate using this EJDK to produce a Java 8 SE Embedded download ".tar.gz", similar to the one I downloaded for update 75.
2. Copy it to my EV3's SD card.
3. Reboot my EV3 with the SD card, and let Linux do its recognition and loading of the new Java version.

Then, it should just be a matter of recompiling my Java code with Eclipse using a compiler level of 1.8, plus tools from a Java SE 8 JDK.

Am I missing anything?

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

Re: Java 8 not yet supported

Postby gloomyandy » Wed Mar 25, 2015 8:38 pm

Yes that is pretty much it. You will need to select a suitable profile (we need various capabilities for some of the features supported by leJOS), I think it is compact 2 that you need. I would also recommend that you use the full client VM (as that supports features that we use). You may also have to manually create the *.tar.gz file (which may not be very easy on a Windows system). I can't remember what the name of the *.tar.gz file needs to be but it will need to have a name similar to that used by the standard Oracle Java 7 download as our scripts look for that name (i think it needs to match ejre*.tar.gz but I may be wrong, look at the shell scripts to find out).

ferrer
Novice
Posts: 37
Joined: Wed Jan 30, 2008 10:25 pm

Re: Java 8 not yet supported

Postby ferrer » Mon May 18, 2015 9:11 pm

I was also interested in getting Java 8 working on the EV3. Thanks to the previous hints given on this thread, I was able to make it work without too much trouble. I've written up a blog post describing how precisely I used jrecreate to achieve this.

http://gjf2a.blogspot.com/2015/05/setting-up-lejos-09-with-java-8.html
Gabriel J. Ferrer
Hendrix College


Return to “EV3 Software”

Who is online

Users browsing this forum: kak3n and 1 guest