mtkennerly / shawl

Windows service wrapper for arbitrary commands
MIT License
495 stars 15 forks source link

is support jar package? #15

Closed wushikj closed 3 years ago

mtkennerly commented 3 years ago

Yes! If you have a self-executing JAR, then Shawl can run it just like any other program. For other JARs, you can configure Shawl to run java -jar your-app.jar.

rustbomber commented 3 years ago

I use this command ,is not work:


PS C:\temp\java_demo> .\shawl.exe run --name a --cwd C:\temp\java_demo -- "java -jar scheduler-demo-2.1.0.RELEASE.jar"```

report:
Failed to run the service:
Winapi(
    Os {
        code: 1063,
        kind: Other,
        message: "The service process cannot connect to the service controller",
    },
)
mtkennerly commented 3 years ago

shawl run isn't meant to be used directly from the console like that. You would configure a service that executes the shawl run command instead. If you try to run it in a normal interactive user session, it will fail.