I believe the error you're seeing is related to JDK version mismatch.
Thanks radoulov buddy! You are absolutely right, there was a mismatch in JDK version. Java is really platform-independant, I think I've confirmed it. Thanks for your help.
Problem solved!
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
Googling java Unsupported major.minor version produces essentially the answer provided by radoulov. The second of about 86K hits contained:
Quote:
It means that you compiled your classes under a specific JDK, but then try to run them under older version of JDK. So, you can't run classes compiled with JDK 6.0 under JDK 5.0. The same with classes compiled under JDK 7.0 when you try to run them under JDK 6.0.
% ./s1
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
Distribution : Debian GNU/Linux 5.0.8 (lenny)
bash GNU bash 3.2.39
java version "1.6.0_22"
-----
Input data file hello.java:
public class hello
{
public static void main( String[] args )
{
System.out.println( "Hello, world from java." );
}
}
-----
Results, compile and execute:
-rw-r--r-- 1 427 Mar 12 11:03 hello.class
-rw-r--r-- 1 127 Mar 12 10:34 hello.java
Edges: 3:0:3 of 308 lines in file "-"
[Opened /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/rt.jar]
[Loaded java.lang.Object from /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/rt.jar]
[Loaded java.io.Serializable from /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/rt.jar]
---
Hello, world from java.
[Loaded java.lang.Shutdown from /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/rt.jar]
[Loaded java.lang.Shutdown$Lock from /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/rt.jar]
Now the code will be transferred to a 32-bit box running GNU java, and only executed with this script: