I created a runnable jar
using spring-boot-maven-plugin
.
The jar can be run using jar -jar %FILENAME%
.
But I'd like to install it as a windows
service using procrun
.
Problem: when I then start the app, I get the following output:
[2016-12-05 12:33:22] [info] [ 7788] Starting service...
[2016-12-05 12:33:23] [error] [ 4856] FindClass de/app/MyApplication failed
[2016-12-05 12:33:23] [error] [ 7788] Failed to start Java
[2016-12-05 12:33:23] [error] [ 7788] ServiceStart returned 4
[2016-12-05 12:33:23] [info] [ 7916] Run service finished.
[2016-12-05 12:33:23] [info] [ 7916] Commons Daemon procrun finished
If I rename the file to *tar.gz I can see there is no directory "de/app/". But a BOOT-INF/classes/de/app
directory.
The question is: why is the app startable by using java -jar
, but not as the procrun service (which should basically do the same)?