Error in jar file but not when program is run as standalone
Hello,
I created a program in java when i compile it javac filename.java and run it java filename using the command line it runs perfectly. The problem I am having is when i make a jar file using this command line jar cfm filename.jar man.tx filename.class filename.png it creates the jar file filename.jar but when i try and run it using this command line java -jar filename.jar it gives me these errors:
Exception in thread "main" java.lang.NoClassDefFoundError: SchoolVue$1
at SchoolVue.RunSchool(SchoolVue.java:97)
at SchoolVue.main(SchoolVue.java:560)
Caused by: java.lang.ClassNotFoundException: SchoolVue$1
at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 19)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 64)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:332)
I've even created a manifest file that contains Main-Class: className and it still doesn't work.
Does anyone have a clue as to why this is happening?