There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie wrote:Is this error when you run the app, or when you load Eclipse?
In case it is an Eclipse‑related question, I shall try (I have never done this before) duplicating the discussion in our IDEs forum, and maybe you will get more attention there.
Bear Bibeault wrote:That error almost always means that the class is trying to be executed in a JRE of an earlier version than the JDK that created it. Are the CentOS and Mac Mini running earlier version of Java than your Pro?
Bear Bibeault wrote:At the command prompt, what does each respective machine show for:
Bear Bibeault wrote:Is your IDE perhaps using an older JDK? I know with IntelliJ (the IDE I use) you can select among a number of Java versions.
Steve
Steve Luke wrote:
Bear Bibeault wrote:Is your IDE perhaps using an older JDK? I know with IntelliJ (the IDE I use) you can select among a number of Java versions.
I believe the problem is reversed - if you compile on an old JDK and run on a new JRE you are ok because the new version knows about the old, it is only the reverse which is bad.
And this seems to be the problem the OP is seeing. The error message says "Unsupported major.minor version 51.0." The class version for Java 7 is 51.0, so it means whatever version of Java the user is trying to run on is prior to version 7.
The options are to either ask the user to install Java 7 on CentOS, or to recompile targeting a previous version of Java - assuming you don't use any of the new Java 7 stuff.
Brian Winkler wrote:A.) do I have to install the JDK for say java 6, or is it included in the java 7 JDK?
Brian Winkler wrote:and B.) how in Eclipse do I tell it which version of java to compile with?
Steve
Brian Winkler wrote: B.) how in Eclipse do I tell it which version of java to compile with?
SCJP, SCWCD.
|Asking Good Questions|
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|