After specifying the Mobilink server to use synchronization scripts I get this error: "Unsupported major.minor version 51.0"
Command to compile:
I wrote the Java code and compile using this command in the command line:
javac -classpath "%SQLANY12%\java\mlscript.jar" MobielCMPSynchronization.java
Cause of the problem:
I googled around and find out this has to do with the Java JDK version compatibility problem: "It means that you compiled your classes under a specific JDK, but then try to run them under older version of JDK." I have JDK7 installed and use JDK7 to compile the code. Why does it generate this error, since I don't compile and run against different JDK versions...
Tried the following:
So what I did was I downloaded & installed the older JDK version which is JDK 6.0. In the Eclipse project I specify the JRE to the version 6 (JavaSE-1.6) as the execution environment. So the compiler is using the 1.6 version. I use the command line to run the compile Java classes command.
I'm still getting this error. :( Any idea what I can do next... I'm confused now since I have two versions of the JDK now.
Ok, I fixed this problem by removing the 1.7 version in the control panel > remove software.
Compiled the class using -target 1.6 and specified the -jrepath to use "%SQLANY12%Sunjre160_x64" as value when starting the Mobilink server.
answered 02 Feb '12, 05:19