This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I try to create a jar file that contains a Rectangle.class and an applet Rectangle1 that will test Rectangle.class This is what I wrote: jar cf lab6.jar Rectangle1.class Rectangle.class The lab6.jar file was created, but when I tried to run it I got a bunch of symbols. I run it by typing: java-jar lab6.jar What did I do wrong? Please help! Thank you Nancy B
You will have to edit the manifest file in the jar to point to your main class. Try adding this line.... Main-Class: classname Replace classname with your main class file name.
Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment.
Ashok C. Mohan
Joined: Dec 03, 2003
If you are using an applet then try calling it from an html page like this... <applet code=mainclassname.class archive="jarname.jar" width=120 height=120> </applet> make sure the html and jar file are in the same directory.