A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
Where is Main program when running a jar file?
Siegfried Heintze
Ranch Hand
Joined: Aug 11, 2000
Posts: 359
posted
Oct 25, 2010 20:20:21
0
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:
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?
Thanks,
Siegfried
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3044
1
I like...
posted
Oct 25, 2010 20:26:45
0
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
I like...
posted
Oct 27, 2010 04:20:47
0
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?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter