hi, i wrote my first java program and compiled it using java 1.6.0. i made even a .jar file. Everything seems to be good but this .jar work only on my computer. when i run it on different computer there is problem with main class. Maybe it depends on version java. i tried to run that .jar on computer with java 1.5.09. you can try run it from java web start java web start It olso work only on my computer. I have JDK 1.6.0. thanks for any replies!
i ran that .jar on computer where is installed only standard java run time from http://java.com/en/ there wasn't set any classpath. when i tried run my jar from command line and there was an information: C:\pizzaria\classes\classes>java -jar app1.jar Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(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) at java.lang.ClassLoader.loadClassInternal(Unknown Source)
when i run .jar by double clic there is communicate: "Could not find the main class. Program will exit. " But everything is good on my computer where i wrote and compiled this program. So what is necessary to do on another computers to work my program correctly? my file .jar is available here thanks for any help