Hey!
I got a Java Project which runs fine when i call the Main class with the java command. Made it into a -jar file with:
jar cmfv manifest kort.jar *
the manifest file contains
Main-Class: src.KortBord
with the line break at the end
when i try to:
java -jar kort.jar
i get:
Exception in thread "main" java.lang.NoClassDefFoundError: src/KortBord (wrong name: KortBord)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: src.KortBord. Program will exit.
aka. NoClassDefFoundError
I have unzipped the .jar and everything looks okay. META-INF/MANIFEST.MF contains the Main-Class and the .class files are there.
I run Ubuntu 11.10 and OpenJDK 6
the class files extends JFrame and JComponent with som ActionsListeners and MouseListeners. nothing special.