aspose file tools*
The moose likes Java in General and the fly likes JAR execute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAR execute" Watch "JAR execute" New topic
Author

JAR execute

Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
Is there a way to make a JAR execute with a double click on windows?

The only way I know to execute a JAR is java -jar
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

You just have to associate jar files with the command

java -jar "%1"

The precise details of how to do this vary with the whims of our friends in Redmond.


[Jess in Action][AskingGoodQuestions]
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Prefer javaw.exe -jar "%*"


Tony Morris
Java Q&A (FAQ, Trivia)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAR execute