Hi!
I would like to run a java application (which is written and run on windows platform) on linux platform. I don't know wether it is possible or not, but I tired on the following way:
I have made a small java application. It worked correctly on windows (I developed it on windows). I copied first only the class file (Start.class) to the linux machine (which has exactly the same JDK as windows machine). When I type the command:
java Start
it gives me the folloving error:
Exception in thread "main" java.lang.ClassFormatError: Start (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)
at java.lang.ClassLoader.defineClass(libgcj.so.7rh)
at java.security.SecureClassLoader.defineClass(libgcj.so.7rh)
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
After that I was trying to compile the source file on linux with the command:
javac Start.java
but the compiler gave me an error in the source file.
Is there any way to run the formerly written java application (on windows) on linux machine?
Thanks