dcsimg
self executable
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, January 28, 2003 08:41 AM

After looking how to build a self executable jarfile which does not seem to be difficult i tried to create one and doubleclicked my jar file but i always, always get a message: "Could not found main class".


Can anyone explain me how to build this jar file in case I have e.g. import org.eclipse.swt.events.*;

Stefan

Re: self executable

Posted By:   Anonymous  
Posted On:   Monday, March 17, 2003 01:17 AM

Let say your class files is in MyProject folder, put the org folder in the MyProject folder. Place the main class (say MyMainClass.class) in the MyProject folder too.



Create a Manifest file called MyManifest.MF as follow an save it in the MyProject folder:




Manifest-Version:1.0
Main-Class:MyMainClass


Need to be notice that the main class is only the name of the class file without .class extension.



execute this command in the command promt where the working directory is MyProject folder:




C:...MyProject>jar cvfm MyJar.jar MyManifest.MF *


Hope this will help.

About | Sitemap | Contact