title: Add Java program to Windows' context menu
body: <p>I'm trying to make a Windows' shell extension to add a program shortcut in the context menu of a certain file type. I've got it working for a random application, but the problem comes when I try to make it execute a java program.</p>
  
  <p>I'm putting this as <code>command</code>:</p>
  
  <pre><code>java -jar "Path\To\MyJar.jar" %1
  </code></pre>
  
  <p>But when I click on the context menu item, it opens the "Open with" window. It also happens using <code>java "Path\To\MyClass.class" %1</code>.</p>
  
  <p>Aren't those types of commands a valid input for the <code>command</code> key? Is there any other alternative? (besides of using an .exe wrapper like with Launch4j).</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: Actually, using this as <code>command</code>:</p>
  
  <pre><code>"myBat.bat" %1
  </code></pre>
  
  <p>where "myBat" only executes the java command given before, is able to execute the program. But unfortunately, <code>%1</code> only passes the path until it finds a space, so this alternative can't be used.</p>