title: Execute a jar from a custom URL protocol
body: <p>I successfully created a custom URL protocol in Windows following this <a href="https://weblogs.asp.net/morteza/How-to-run-a-desktop-application-from-a-web-page" rel="nofollow noreferrer">instructions</a> that targets a simple jar that I created, I can run this jar manually by executing this command (java is in the PATH):</p>
  <pre><code>java -jar test.jar
  </code></pre>
  <p>But when I open an URL that uses my custom protocol, it doesn't execute the jar, the protocol is supposed to execute the same command, this is how it looks in the Registry Editor:</p>
  <pre><code>&quot;C:\Program Files\Java\jdk1.8.0_152\bin\java.exe -jar C:\testFolder\test.jar&quot; &quot;%1&quot;
  </code></pre>
  <p>If I replace the jar with an <code>.exe</code> file it works fine, for example <code>notepad.exe</code> or the calculator, so the problem is executing the jar.</p>