I've openHAB configured as a windows service... It starts fine, but if I need/want to restart the service, it fails, without much in the way of a reason... I expect I'm in the minority here when running as a service, so not expecting much in the way of a solution to this, but just wondered if anyone else had seen this?
set ECLIPSEHOME=server
:: set ports for HTTP(S) server
set HTTP_PORT=8080
set HTTPS_PORT=8443
set FOLDER=C:\openHAB
set JAVA_HOME="C:\Program Files (x86)\Java\jdk1.8.0_31"
prunsrv //DS//OpenHab
prunsrv //IS//OpenHab --DisplayName="OpenHab Service" ^
--ServiceUser .\Administrator --ServicePassword password^
--Classpath "%FOLDER%\server\plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar;%FOLDER%\server\plugins\org.eclipse.scada.utils.osgi.daemon_0.1.0.v20140430-1536.jar"^
--Install=%FOLDER%\prunsrv.exe --Jvm=auto ^
--StartMode jvm^
--StartClass org.eclipse.equinox.launcher.Main^
--StartMethod main^
--Startup auto^
++StartParams -console^
++StartParams -consoleLog^
++JvmOptions -Dosgi.clean=true#-Declipse.ignoreApp=true#-Dosgi.noShutdown=true#-Djetty.port=%HTTP_PORT%#-Djetty.port.ssl=%HTTPS_PORT%#-Djetty.home=.#-Dlogback.configurationFile=configurations/logback.xml#-Dfelix.fileinstall.dir=addons#-Djava.library.path=lib#-Djava.security.auth.login.config=./etc/login.conf#-Dorg.quartz.properties=./etc/quartz.properties#-Dequinox.ds.block_timeout=240000#-Dequinox.scr.waitTimeOnBlock=60000#-Djava.awt.headless=true#-Dfelix.fileinstall.active.level=4^
--StopMode jvm^
--LogPath %FOLDER%\logs
pause