aspose file tools
The moose likes Beginning Java and the fly likes Where is Main program when running a jar file? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Where is Main program when running a jar file?" Watch "Where is Main program when running a jar file?" New topic
Author

Where is Main program when running a jar file?

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 359


I downloaded the source code from http://sourceforge.net/projects/jiu/ and found this little bat file called run-jiuawt.bat containing a single line:



I did a and found a a dozen main programs!

Which main program am I running when I run run-jiuawt.bat?

Thanks,
Siegfried

Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3044
    
    1

Open MANIFEST.MF file in the META-INF folder in a text editor. The Main-class entry should let you know.
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12907
    
    3

As Stephan says, there is a META-INF/MANIFEST.MF file inside the JAR file that specifies what the main class is.

For more details, see: Packaging Programs in JAR Files in The Java Tutorials.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where is Main program when running a jar file?
 
Similar Threads
properties file not found
jar
Main class not found
Help! Accessing files in a JAR file at Runtime
problem finding resouircebundle?