File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAR execute" Watch "JAR execute" New topic

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

Joined: Jul 08, 2003
Posts: 24199

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)
I agree. Here's the link:
subject: JAR execute
It's not a secret anymore!