0

I launch an application with a cli in Java. My Java application run in Tomcat as a service. (with system user)

When I launch my application with a cli, it is launch with system user too but I want to launch it with administrator account, not system, to avoid a problem ... How can I do that in Java ?

Thanks !

Tata2
  • 893
  • 2
  • 8
  • 14

1 Answers1

0

To solve the problem, I need to change the owner of the service to launch it with an administrator account.

You can set this with this command (https://stackoverflow.com/a/308319/2515673) :

sc config "service name" obj= "[.\username]" password= "[password]"
Community
  • 1
  • 1
Tata2
  • 893
  • 2
  • 8
  • 14