user496949
user496949

Reputation: 86055

how to make java starter?

After having the jar, how to make a starter program (For example, in windows, an exe file) which can start the jar?

Upvotes: 1

Views: 932

Answers (2)

Iulius Curt
Iulius Curt

Reputation: 5104

You can make a .bat file to run your .jar
Just create a new text file and write in it:

java -jar "filename.jar"

Save it and rename it to whatever.bat. Now in Windows you can run that whatever.bat file and your java program will be run.
Also, JRE has to be installed on the machine you will run this.

Upvotes: 2

uckelman
uckelman

Reputation: 26194

Try Launch4j. It works very well for building Java launchers for a project of mine.

Upvotes: 5

Related Questions