I am deploying a command-line tool that is written in Java that accepts command-line arguments. I have it packaged as a JAR file because it is convenient to have a single file.
The problem is that to run it you must first call java -jar (filename) (args)
and that is quite annoying.
The current way I have it is to have a simple bash script that launches it, but this is less than ideal.
Is there anyway (in Linux, Ubuntu Server) to make a JAR file that invokes the Java VM by itself? I've looked for a shebang, but couldn't find one (which of course makes sense since it is compiled code).
This is what I want to do: myprogram.jar arg1 -arg2
instead of this: java -jar myprogram.jar arg1 -arg2
Thanks,
Brian