0

Working with Eclipse Kepler on a Ubuntu 12.04 64 bit machine my simple Java application loads and runs just fine both from Eclipse and as an exported runnable jar file. It also runs on my mac Air and on a Windows 7 machine. It does NOT load on a Ubuntu 12.04 32 bit machine. The user confirms that he is using Java 7. The application uses the ij.jar and the GUI was built with Builder. I don't explicitly use version numbers ... (AFAIK)

The application allows the user to select one or more .raw "image" files and convert them into TIFF files.

Here's a C&P from attempting to run it from the command line:

adl-usa@adlusa-945GM2:~/workspace/Lockwood$ ls -la *.jar
-rw-rw-r-- 1 adl-usa adl-usa 10992928 Apr 25 09:41 RawToTIFF.jar
adl-usa@adlusa-945GM2:~/workspace/Lockwood$ java -jar RawToTIFF.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: psw/ConverstionTool/RawToTIFF : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
adl-usa@adlusa-945GM2:~/workspace/Lockwood$

I've tried to move an application to another machine a few times but have not seen problems like this before.

Can anyone shed light on this?

Nate Lockwood
  • 3,325
  • 6
  • 28
  • 34
  • I once had a user swear up and down that he had properly set up his environment. Asking him to print it, however, showed that it was set up incorrectly. I recommend asking the user to type `java --version` and send you the results. – kdgregory Apr 29 '14 at 23:00
  • Only one dash in `java -version` – David Conrad Apr 29 '14 at 23:36
  • If I had used more care the earlier question would have been suggested when started the post. I now think that the user has more than one JRE and an older one is being used. – Nate Lockwood May 01 '14 at 17:34

1 Answers1

0

The error that you are gettig is clear in the log :

java.lang.UnsupportedClassVersionError: psw/ConverstionTool/RawToTIFF : Unsupported major.minor version 51.0

The Jar was compiled in a different version of JDK(higher version) and the JRE on your target machine does not support that version yet.

Look into the following SO Post : link

Community
  • 1
  • 1
Kakarot
  • 4,252
  • 2
  • 16
  • 18