UnsupportedClassVersionError
[QUOTE=pbrockway2;90391]The following works for me (hw.jar just prints hello world to the console).
[code]
@echo OFF
java -jar g:\hw.jar
pause
I tried this and it gives me this message:-- please please help..
Exception in thread "main" java.lang.UnsupportedClassVersionError: cmdb/MainForm
: Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknow n Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: cmdb.MainForm. Program will exit.
Press any key to continue . . .
Thats all it does .
Re: Double-clicking .jar files?
You've compiled in Java 1.7 (that's the '51' in the error message), but are trying to run in an earlier version of Java.
Re: UnsupportedClassVersionError
Moses76, don't post to old dead threads and don't hijack another poster's thread, especially with an unrelated question. Your problem has nothing at all to do with the question asked and answered in http://www.java-forums.org/new-java/...jar-files.html
Whenever you have a question, start a new thread; they're free.
db