title: Open file with JNLP / Webstart
body: <p>I'm trying to pass a file path as parameter on Windows to be opened in a <code>JAVA</code> <code>JNLP</code>. Starting with the original JAR file, i created a wrapper <code>BATCH</code> file <code>runMyJar.bat</code>:</p>
  
  <pre><code>java -jar "%~dp0MyJarFile.jar" %*
  </code></pre>
  
  <p>Then i configure windows to open all <code>*.test</code> files with my <code>runMyJar.bat</code> which works fine: When i double click any <code>*.test</code> file it run <code>MyJarFile.jar</code> and passes the path of the <code>*.test</code> file.</p>
  
  <p>Now i want to do the same with a <code>JNLP</code> to deploy my <code>JAR</code> with webstart but to offer Windows <code>Open with...</code> for my application. So my idea is to offer a <code>BATCH</code> wrapper file again:</p>
  
  <pre><code>javaws -open %1 "http://urlToMyJNLP"
  </code></pre>
  
  <p>Unfortunately thats not working. When starting this wrapper batch with a file i'm just receiving a null object in my <code>static void main</code> method for the parameter <code>args</code>.</p>
  
  <p>Any help is appreciated.</p>
  
  <p><strong>Update</strong><br>
  Based on the answer i summarized it <a href="http://open-sourced.de/show_article.php?articleid=65" rel="nofollow">here</a>.</p>