java - How can I convert a .jar to an .exe? -


i want convert .jar .exe microsoft. there program converter this?

also if there's 1 mac , linux appreciate suggestions too.

launch4j works on both windows , linux/mac. if you're running linux/mac, there way embed jar shell script performs autolaunch you, have 1 runnable file:

exestub.sh:

#!/bin/sh myself=`which "$0" 2>/dev/null` [ $? -gt  0 -a -f "$0" ] && myself="./$0" java_opt="" prog_opt="" # parse options determine ones java , ones program while [ $# -gt 0 ] ;     case $1 in         -xm*) java_opt="$java_opt $1" ;;         -d*)  java_opt="$java_opt $1" ;;         *)    prog_opt="$prog_opt $1" ;;     esac     shift done exec java $java_opt -jar $myself $prog_opt 

then create runnable file jar:

$ cat exestub.sh myrunnablejar.jar > myrunnable $ chmod +x myrunnable 

it works same way launch4j works: because jar has zip format, header located @ end of file. can have header want (either binary executable or, here, shell script) , run java -jar <myexe>, <myexe> valid zip/jar file.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -