lundi 11 mai 2015

How to launch a jar file on windows startup from the registry?

I am trying to launch a jar file on Windows Server 2008 R2 startup.

I tried to add a key\value to

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

I tried as a value several alternatives:

 java -jar c:\jcm\jcm.jar
 "java -jar c:\jcm\jcm.jar"
 c:\program files(x86)\java\jre1.8.31\bin\java.exe -jar c:\jcm\jcm.exe
 "c:\program files(x86)\java\jre1.8.31\bin\java.exe -jar c:\jcm\jcm.exe"
 "c:\program files(x86)\java\jre1.8.31\bin\java.exe" -jar c:\jcm\jcm.exe

But none of them launched the program.

Can you advise please?

Thank you.

Aucun commentaire:

Enregistrer un commentaire