Exception in thread "main" java.lang.ClassFormatError: onmyown.Main (unrecognized cla
So I'm trying to run a program I made in java netbeans....I am using fc7 it builds ok but when I try to run it in terminal I get errors this is what happened
java -jar "/home/zimboney/onMyOwn/dist/onMyOwn.jar" Exception in thread "main" java.lang.ClassFormatError: onmyown.Main (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 was looking over the internet for a solution and someone said to change the default version I currently have 1.6 installed but my java --version says I have 1.5 maybe that is the problem can someone tell me how to change that |
Java/Fedora Tips & Tricks
Not sure if this will help you, but my Java problems in Fedora usually are fixed after following this howto...
http://www.gagme.com/greg/linux/f7-tips.php#java /Roger |
The differences between jdk5 and jdk6 tend to be minimal even though some frameworks (spring for example) will fail to install with jdk6 installed. I think it far more likely that you are simply facing a programming error. From the looks of it, the compiler can't find the class to load: wrong name, wrong extension, ...?
|
thanks for your help nordickiwi after looking at that I did what it told me to do then I uninstalled java and installed it again then it started working for me
|
No worries
Pleased to help.
/Roger |
All times are GMT -5. The time now is 12:06 AM. |