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.
Joined: Feb 25, 2004
Thank you very much Nancy B
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com