Hello
Windows 7, latest Java installed.
I have two jar files, on with the main class included which uses classes in the other java class.
The two jar file names are
swt.jar (contain org.eclipse. ..... classes)
HelloWorld.jar (containing the main class)
When I try to start the java application at the command prompt with the following
java -jar HelloWorld.jar I get the following exception
How do I, at the command prompt, get the jvm to "look into" swt.jar as well, the CLASSPATH is not set in command window.
Regards
Windows 7, latest Java installed.
I have two jar files, on with the main class included which uses classes in the other java class.
The two jar file names are
swt.jar (contain org.eclipse. ..... classes)
HelloWorld.jar (containing the main class)
When I try to start the java application at the command prompt with the following
java -jar HelloWorld.jar I get the following exception
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Layout
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Layout
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: gui.Main. Program will exit.
Regards
Comment