2016-06-15 1 views
1

Je suis en train de faire mon programme pour être un service donc j'ai trouvé procrun de http://commons.apache.org/proper/commons-daemon/procrun.html mais je fait une installservice.bat et de garder recieving le même message d'erreur lorsque je tente d'exécuterProcrun ne peut pas trouver la clé de Registre pour le service

./prunsrv.exe //TS//InkEstService 

Le code d'erreur est ce

[2016-06-15 09:44:06] [warn] [ 7136] The system cannot find the Registry key for service 'InkEstService' 
[2016-06-15 09:44:06] [error] [ 7136] Load configuration failed 
[2016-06-15 09:44:06] [error] [ 7136] The system cannot find the file specified. 
[2016-06-15 09:44:06] [error] [ 7136] Commons Daemon procrun failed with exit value: 2 (Failed to load configuration) 
[2016-06-15 09:44:06] [error] [ 7136] The system cannot find the file specified. 

mon installservice.bat est la suivante

set SERVICE_NAME=InkEstService 
set PR_INSTALL=C:\Users\TStraley\Desktop\commons-daemon\prunsrv.exe 

REM Service log configuration 
set PR_LOGPREFIX=%SERVICE_NAME% 
set PR_LOGPATH=c:\logs 
set PR_STDOUTPUT=auto 
set PR_STDERROR=auto 
set PR_LOGLEVEL=Error 

REM Path to java installation 
set PR_JVM=C:\Program Files\Java\jdk1.8.0_92\jre\bin\server\jvm.dll 
set PR_CLASSPATH=C:\Users\TStraley\Desktop\Ink/Estimator\InkDataCollection.jar 

REM Startup configuration 
set PR_STARTUP=auto 
set PR_STARTMODE=jvm 
set PR_STARTCLASS=Platform.Platform 
set PR_STARTMETHOD=start 

REM Shutdown configuration 
set PR_STOPMODE=jvm 
set PR_STOPCLASS=Platform.Platform 
set PR_STOPMETHOD=stop 

REM JVM configuration 
set PR_JVMMS=256 
set PR_JVMMX=1024 
set PR_JVMSS=4000 

REM Install service 
prunsrv.exe //IS//%SERVICE_NAME% 

J'ai suivi le tutoriel fourni sur https://joerglenhard.wordpress.com/2012/05/29/build-windows-service-from-java-application-with-procrun/ ... toutes les idées seraient grandement appréciées!

+0

Aussi si j'essaye seulement d'exécuter ./prunsrv.exe le même message d'erreur apparaît excepté avec "Le système ne peut pas trouver la clef de Registre pour le service" prunsrv " – tstraley

Répondre

0

Vous devez renommer le prunsrv.exe au même nom que votre service i.e. « InkDataCollection.exe »

Je l'ai essayé ça marche pour moi.