-   Fedora (
-   -   Exception in thread "main" java.lang.ClassFormatError: onmyown.Main (unrecognized cla (

zimboney 07-19-2007 11:48 AM

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(
at java.lang.ClassLoader.defineClass(
at gnu.gcj.runtime.SystemClassLoader.findClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(

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

nordickiwi 07-19-2007 02:56 PM

Java/Fedora Tips & Tricks
Not sure if this will help you, but my Java problems in Fedora usually are fixed after following this howto...


jay73 07-19-2007 05:53 PM

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, ...?

zimboney 07-20-2007 12:40 PM

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

nordickiwi 07-20-2007 01:00 PM

No worries
Pleased to help.


All times are GMT -5. The time now is 12:12 PM.