MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/i4zpj/making_really_executable_jars/c2108ev/?context=3
r/java • u/gst • Jun 21 '11
12 comments sorted by
View all comments
2
You can skip the shell part, though this makes assumptions about the location of java.
java
$ cat prepend #!/usr/bin/java -jar $ cat prepend example.jar > example $ chmod +x example $ ./example Hello, World
My system lets me run jar files directly anyway. I don't know what part of my system is allowing this to work correctly, though.
$ chmod +x example.jar $ ./example.jar Hello, World
2
u/skeeto Jun 21 '11 edited Jun 21 '11
You can skip the shell part, though this makes assumptions about the location of
java.My system lets me run jar files directly anyway. I don't know what part of my system is allowing this to work correctly, though.