Running jar as Windows service using nssm

I am trying to run jar (spring app) as a windows service. I am using nssm for this.

When I run the jar file with java -jar myjar.jar

everything works fine. My webapp responds when I enter localhost: 8080 where it runs.

After launch

nssm install MyService java -jar myjar.jar
nssm start MyService

      

I enter the console: MyService: START: The operation completed successfully

My application usually registers in a file as well, but does not work when running as a service. It looks like the app doesn't start at all. When I try to access localhost: 8080 nothing responds.

Why doesn't the application work when I run it as a service using nssm?

+3


source to share





All Articles