Usage of Service type of generated exe
Generated exe itself has no special usage. Those arguments passed to generated exe at command line, will be passed to the java program's "main(String  argv)" method.
Service type of generated exe cannot be executed directly at command line. It has a usage of installation and uninstallation for Service.
Usage of Service Type
At command line, generated exe can be "/install"ed, "/uninstall"ed, or "/test"ed:
YourProgram /install [auto] /install auto|"" [arg1] [arg2] /uninstall /test
To install the generated exe as System Service.
The 'auto' is optional, if "/install auto", the service will automatically start up when System starts up. After successful "/install", you can find the service in service manager, "services.msc" on Windows, "ntsysv" on CentOS 6, "systemctl" on CentOS 7, "launchctl list" on Mac OS etc.
For Mac OS: You can install with "sudo" or without. But "sudo" or not will install the service in different namespace. With "sudo" install for all users, without "sudo" install for current user.
/install auto|"" arg1 arg2 [since 2.0.4]
From v2.0.4, the service type of application supports to add fixed arguments to programs, both Windows and Linux, Mac OS supported.
To uninstall the Service from System.
You'd better stop the service before you're going to uninstall the Service. Or on Windows, you can uninstall successfully, but you may need to restart System to uninstall the Service completely. On Linux, Mac OS, you cannot uninstall it if it is not stopped.
To run the Service type of generated exe as a console type. This is for debug use.
- Run as Service page for more information about Service.
Add new comment