Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

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

Moderators: roger, gloomyandy, skoehler

arebum
New User
Posts: 5
Joined: Sat May 09, 2015 10:17 pm

Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby arebum » Sun May 10, 2015 6:58 am

Hello everyone,

I'm pretty new to these forums, so forgive me if I make a mistake or ask a dumb question.
I am having a problem with uploading code from Eclipse. I am running Windows 8.1 and trying to connect to the EV3 brick over the USB cable. I have successfully booted into LeJOS on the EV3, and I can push code (at least I think I can) Every time I try to upload from Eclipse over the USB cable, I get an error on the EV3 brick that says "java.lang.UnsupportedClassVersionError". Has anybody seen this before? Does anybody know how to fix it?

Thanks

arebum
New User
Posts: 5
Joined: Sat May 09, 2015 10:17 pm

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby arebum » Sun May 10, 2015 7:00 am

More information on the error:
It also says "unsupported major.minor version 52.0"

abak
New User
Posts: 3
Joined: Sun May 03, 2015 8:33 am

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby abak » Sun May 10, 2015 11:27 am

This means that Java 7 on Lego brick cannot read class files complied by Java 8 on your PC.

You need to tell Eclipse to compile Java 7 compatible byte code. Go to Windows -> Preferences -> Java -> Compiler and set "Compiler compliance level" to 1.7.

If you have some other (not EV3) projects in Eclipse, you can change project-specific setting only: right-click the project in Package Explorer -> Properties -> Java Compiler.

arebum
New User
Posts: 5
Joined: Sat May 09, 2015 10:17 pm

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby arebum » Sun May 10, 2015 4:19 pm

Thanks! That actually fixed it.

User avatar
ProHacker
New User
Posts: 24
Joined: Mon Dec 25, 2017 8:50 am
Location: Russia

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby ProHacker » Fri Dec 29, 2017 4:22 pm

If you have some other (not EV3) projects in Eclipse, you can change project-specific setting only: right-click the project in Package Explorer -> Properties -> Java Compiler.
Guys, it works! Thank you!
LeJOS rules! :D

ThomasA
New User
Posts: 5
Joined: Tue Jan 16, 2018 12:45 am

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby ThomasA » Tue Jan 16, 2018 12:51 am

Just one question from an newbi:
I installed JRE 1.8. When I swich to compiler complience-level 1.7 I get the message "when selection 1.7 complience make sure to have a comlient jre installed and activated (currently 1.8). configure the installed JREs and execution environments or cchange the jre on the java build path.

As you cannot get JRE 1.7 on the oracle-side I wonder what to do?!

Regards
Thomas

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

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby gloomyandy » Tue Jan 16, 2018 2:43 pm

What makes you think you can no longer get Java 7?
http://www.oracle.com/technetwork/java/ ... 21261.html
leJOS news https://lejosnews.wordpress.com/

ThomasA
New User
Posts: 5
Joined: Tue Jan 16, 2018 12:45 am

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby ThomasA » Sat Jan 20, 2018 6:38 pm

Thanks!
This works fine.

Thomas
P.S. Do you think there will be a time when Lejos supports Java 8?

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

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby gloomyandy » Sat Jan 20, 2018 8:21 pm

It sort of already does, but it is far more work than most people can be bothered with and Java 8 really doesn't have any really big advantages for most people working with LEGO robots...
viewtopic.php?f=18&t=6435
leJOS news https://lejosnews.wordpress.com/

ThomasA
New User
Posts: 5
Joined: Tue Jan 16, 2018 12:45 am

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby ThomasA » Sat Jan 20, 2018 8:46 pm

ok, I read this and found out that I am pretty fine with java 7.

Just one additional question from an newby: Why is there no new version of lejos since 2015?

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

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby gloomyandy » Sat Jan 20, 2018 9:58 pm

Why no new version? Because no one has contributed anything major since then and most of the people working on leJOS have moved on. The EV3 is now pretty old and so there is not a lot of "new stuff" that requires changes to leJOS itself. So for instance I've been working on a few projects but they didn't really require anything new in leJOS to get them working, instead I worked on the higher level code that was specific to my project.
https://lejosnews.wordpress.com/2017/07/15/slam/

Basically things are "good enough" for the current people using leJOS.

So at the moment there are only a couple of people active with leJOS (myself and Aswin), Juan Antonio has been doing some work on allowing some of the leJOS classes to work on ev3dev.

I suspect that the EV3 version is pretty much the end of the road for leJOS. It is likely that any future hardware from LEGO will be good enough to run something like ROS which opens up a wholes new world of robotics software. The EV3 is almost good enough to do this today (some folks have ROS running on ev3dev, but I'm not sure how well it works). The need for a LEGO specific Java robotics platform will probably disappear in the same way that the need for a LEGO (RCX and NXT) specific JVM did when the EV3 came about.

It's been good fun though!
leJOS news https://lejosnews.wordpress.com/

ThomasA
New User
Posts: 5
Joined: Tue Jan 16, 2018 12:45 am

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby ThomasA » Sun Jan 21, 2018 3:26 pm

Hi Andy,
sorry to read this from you.
I thought even though the EV3 is a bit older but stdents worldwide still have their competions on using it and nearly ervery school round here is still using it to teach robotic to the students it is still on the right track. I thought that the lejos community (which is of course adressing the more grown up
useres or parents like me) might still be very active and at least the questions in the forum seem to be not too few.

Anyhow: Do you have any idea of the lego strategy on EV3? Is booster the successor or just the little brother? When would you expect the next step of lego?

Best regards
Thomas

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

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby gloomyandy » Sun Jan 21, 2018 6:55 pm

Well the EV3 is still a good platform, it is amazing what you can do with it. Things that a few years ago were the subject of University research projects can now be reproduced using the EV3. So leJOS is still very useful, but I'm not sure that it really needs much further development. In some respects we have reached the limitations of the hardware, but who knows there may be something new around the corner. I'm not privy to any sort of inside line to LEGO and it's robotics line. I would be a pity if they decide to dumb things down to what are in effect just ways of doing remote control, but who knows. I'd like to see the EV3 replaced by something capable of running ROS as well as a simpler graphical programming tool. That would allow it to be used for University and school projects which would be pretty good. But in some ways the actual main processor is not the issue, what is needed is more sophisticated sensors and better motors/encoders. The ability to use vision processing, lidar etc. Probably too high end for LEGO to support, but you never know.

So in the meantime, I'll probably keep experimenting and answer questions here (even though most of the answers are already here!). That and delting the spam posts to keep the forum useful!
leJOS news https://lejosnews.wordpress.com/

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

Re: Runtime Error on All Uploads from Eclipse: "java.lang.UnsupportedClassVersionError"

Postby esmetaman » Thu Feb 22, 2018 6:28 pm

Hi Andy,

in my opinion, leJOS is not only a set of libraries, it is a way to build software for robots with Java. Now, it is true that ROS is everything but it requires wrapper libraries and other stuff. In EV3 Side, Python is Strong in this generation but the development is less powerful than LeJOS support for NXT in perspective. LeJOS now has a elegant API for local navigation and the support to manage multiple robots is nice (Not for a beginner user).

LeJOS has added value in: Local Navigation & Remoting

Maybe leJOS as a Collective, require some new ways to evolve.

In my case, I will continue adding my contribution to the project from my side.

New ideas:

- Cloud Services for EV3 Robots
- Computer Vision Utilities
- General SLAM solution

I need to invest time to build the support for OpenJDK10, java 9 is available so, anyone can use java 9 JRE.
I am not agree that Java 8 or Java 9 not offer new advantages for the developers.

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 1 guest