How do you execute a JAR file?
807599Jan 28 2007 — edited Mar 18 2007I'm sorry this is so basic, but I honestly do not know how to do this nor can I find anything online here or anywhere via Google to help me with this one.
I have a JAR file that I created on another machine using JDK 1.6.0 and NetBeans 5.5 on WinXP.
I copied and pasted that JAR file over to my machine at home also using JDK 1.6.0 and NetBeans 5.5 on WinXP
I put the exact directory name where the JAR file resides, "C:\Program Files\Java\jdk1.6.0\classes", in CLASSPATH and rebooted my machine.
However, upon CD'ing to that directory and doing "java -classpath . GUI.jar", I get a "NoClassDefFoundError" when trying to do so.
Furthermore, I was not sure how to use NetBeans to run the JAR file to execute the classes within.
What did I do wrong? I'm so sorry this is so basic.
Thanx
Phil