This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 24166
    
  30

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)
 
 
subject: JAR execute
 
Similar Threads
Making a class executable.
Is there a thread that runs outside the jvm
problem turning to exe
jar files
Java Programm doesn't start when not in default package