title: How to create a cmd file to run jars?
body: <p>I have literally tried everything to try and make my jar files executable by double clicking. But i have come to the conclusion that either I need some major help because my java installation has a problem, or I need to create a .cmd file to automatically run them properly. The code in the file would be like this:  </p>
  
  <pre><code>java -jar myfile.jar
  </code></pre>
  
  <p>What would i replace <code>myfile.jar</code> with so that windows puts in the file extension of what i'm trying to open? Thanks.</p>