Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jar fille -------------

Status
Not open for further replies.

DaniDak

Technical User
Mar 13, 2002
44
0
0
US
Hi,

I have a command line application that I want to make as a executable jar file, when I try to click on the jar file nothing happens, but it works fine when I run the jar file from the command line. Is it possible to run a command line application simple by clicking on the jar file like with the C/C++ .EXE file.

Thank you
 
Yes, it's possible. The manifest in the jar file must have the Main-Class: attribute set to the class name which contains your main() method. Running an application from a jar file also results in any system classpaths being ignored, so the jar file should either contain all required classes or the other jars should reside in the ext directory.
I use JDeveloper to automate all that.

And of course, you have to tweak windows to launch javaw.exe when you double-click on a jar file. Here's a page with instructions:




"When you have eliminated the impossible, whatever remains, however
improbable, must be the truth." ~ Arthur Conan Doyle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top