I successfully created a custom URL protocol in Windows following this instructions that targets a simple jar that I created, I can run this jar manually by executing this command (java is in the PATH):
java -jar test.jar
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:
"C:\Program Files\Java\jdk1.8.0_152\bin\java.exe -jar C:\testFolder\test.jar" "%1"
If I replace the jar with an .exe
file it works fine, for example notepad.exe
or the calculator, so the problem is executing the jar.
Is the required command in the registry entry. I was also trying around with url protocols and had the same problem. I don't know why, but it works.
Edit: use javaw.exe instead of java.exe to suppress the terminal.