A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Where is Main program when running a jar file?
Joined: Aug 11, 2000
Oct 25, 2010 20:20:21
I downloaded the source code from
and found this little bat file called run-jiuawt.bat containing a single line:
java -mx300m -jar jiu.jar
I did a
/usr/bin/find . -name \*.java | xargs grep -in main
and found a a dozen main programs!
Which main program am I running when I run run-jiuawt.bat?
Stephan van Hulst
Joined: Sep 20, 2010
Oct 25, 2010 20:26:45
Open MANIFEST.MF file in the META-INF folder in a text editor. The Main-class entry should let you know.
Jesper de Jong
Joined: Aug 16, 2005
Oct 27, 2010 04:20:47
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
- My blog about Scala
I agree. Here's the link:
subject: Where is Main program when running a jar file?
properties file not found
Main class not found
Help! Accessing files in a JAR file at Runtime
problem finding resouircebundle?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013