title: Running a JAR file without directly calling `java`
body: <p>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.</p>
  
  <p>The problem is that to run it you must first call <code>java -jar (filename) (args)</code> and that is quite annoying.</p>
  
  <p>The current way I have it is to have a simple bash script that launches it, but this is less than ideal.</p>
  
  <p>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).</p>
  
  <p>This is what I want to do: <code>myprogram.jar arg1 -arg2</code> instead of this: <code>java -jar myprogram.jar arg1 -arg2</code></p>
  
  <p>Thanks,<br>
  Brian</p>