I have a bunch of .class files in the current directory, as well as a single line text file which has the following: Main-Class: MyServer Then, I move into that directory and use the following command: jar mcf main-class.txt MyServer.jar *.class repository/*.class This gives me a MyServer.jar file which is great. Then, I want to use: java -jar MyServer.jar to execute the application. Well, this doesn't seem to work. When I go back and unpack the jar with jar xvf MyServer.jar and look at the manifest file it doesn't have anything about the Main-class stuff in it! Can anyone offer any advice? Thanks
Michael Hildner
Ranch Hand
Joined: Oct 13, 2000
Posts: 297
posted
0
I've had a similar problem, but using class path in the manifest. Fixed it by using -M and including the META-INF directory. It seems a lot easier just to zip up what you need, naming it .jar. [This message has been edited by Michael Hildner (edited April 24, 2001).]