3 ms·
IMHO, the best way to distribute java programs is create a single jar and the append that jar to this shell script: #!/bin/sh exec java $JAVA_OPTS -jar
by spullara 12y ago
IMHO, the best way to distribute java programs is create a single jar and the append that jar to this shell script:
#!/bin/sh
exec java $JAVA_OPTS -jar "$0" "$@"
- aikah 12y agoand then it doesnt run on windows...so much for run everywhere... the best way to distribute a package is to create a proper package for each plateform and encapsulate any java "gimmick".
- jebblue 12y agoRight, you don't need the script as long as it's an executable jar, it will run fine with: java -jar Product.jar If there are any native libraries then they need to be built into the jar, you could do one jar or one for each platform.
- spullara 12y agoWindows? Really? I think there is an SNL skit in there somewhere for people still deploying server software on Windows.
- gaul 12y agoreally-executable-jars codifies this as a Maven plugin: https://github.com/brianm/really-executable-jars-maven-plugin https://github.com/brianm/really-executable-jars-maven-plugi...