1
1
I have a jar file with a main class in it. The main class is already configured in the manifest file, meaning the jar can be executed in the following way:
java -jar Main.jar
I'd like to make it executable, meaning running it in the following way, without the need to provide any parameter. Windows:
Main.cmd
or Linux:
Main.sh
How can I package the jar into an executable?
There's an answer for Linux. Any idea how to package a java jar in an executable for Windows? – AlikElzin-kilaka – 2015-05-10T11:54:52.427
Honestly, how hard is it to search the net for "jar to exe"? There are a number of solutions available. – Karan – 2015-05-11T20:30:48.953
@karan great, then it will be easy to answer the question. – AlikElzin-kilaka – 2015-05-12T03:46:16.767
Definitely. You can edit your existing answer and add it in, then self-accept. – Karan – 2015-05-12T04:26:10.117
@Karan And deny you the credit? Na ;-) – AlikElzin-kilaka – 2015-05-12T05:14:25.787
1It's ok, you're welcome to it. :) In all seriousness though, a single canonical answer would be better because you've asked about multiple OSes, and unless an answer covers both it wouldn't be complete. – Karan – 2015-05-12T05:21:48.000
Related: http://stackoverflow.com/questions/147181/how-can-i-convert-my-java-program-to-an-exe-file
– AlikElzin-kilaka – 2015-05-12T10:22:10.010