problem with java in fedora 7
hi everyone
i have installed jdk 1.6 in fedora 7.. i am able to compile a program without any errors....but when i use the command java ClassName i am getting the following error... Exception in thread "main" java.lang.ClassFormatError: JFrameProgram (unrecognized class file version) at java.lang.VMClassLoader.defineClass(libgcj.so.8rh) at java.lang.ClassLoader.defineClass(libgcj.so.8rh) at java.security.SecureClassLoader.defineClass(libgcj.so.8rh) at java.net.URLClassLoader.findClass(libgcj.so.8rh) at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.8rh) at java.lang.ClassLoader.loadClass(libgcj.so.8rh) at java.lang.ClassLoader.loadClass(libgcj.so.8rh) at gnu.java.lang.MainThread.run(libgcj.so.8rh) I have set the environmental variable JAVA_HOME /home/fedora/jdk1.6.0 is there any conflict between the jdk that i have installed and the default java that has come with fedora 7... if so how to rectify this conflict....?? Please help me to compile programs in terminal in fedora 7 THANKS IN ADVANCE |
If there is a problem between versions of java it will probably be because you are running the "wrong" java. Setting JAVA_HOME wont help inregards to which java binary is being executed.
try: which java : will show which java is in your path first java -version : will run the java in your path and show its version if the wrong java is being run try running with the full path name: /home/fedora/jdk1.6.0/bin/java javaprogram.jar if that worked you might want to link your home java version to /usr/bin replacing the java that is there or change your $PATH variable to use your java first. |
All times are GMT -5. The time now is 08:47 PM. |