Exception in thread "main" java.lang.ClassFormatError: onmyown.Main (unrecognized cla
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.