I have been wanting to run some java scripts on my CLI Centos 5.0 box
i have been compiling them on windows using JDK6 when i ran one on my linux box it said the Class version was incompatible.
Code:
Exception in thread "main" java.lang.ClassFormatError: day (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)
i ran
java -version:
Code:
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
so only 1.4 i downloaded JDK6_10 installed it ran
java -version and it was the same no change.
i ran
javac -version and it said
and i am sure
java comes in JDK but i downloaded JRE6 install it but same results
i have restarted and no change.
what have i missed?