K. Tsang wrote:Instead of converting the class file to exe why not just create a batch (bat) file and say "java MyServer" and the windows service point to the batch file.
Martin Vajsar wrote:
Another possibility would be to use Windows task scheduler - it might be nearly as good as a service without the need to create one. But obviously, some amount of setup will always be needed to run an application on a remote server
Claude Moore wrote:
I don't know how sc create command works, but on the base of the error you posted, I would say that the problem is that the equivalent of onStart() method doesn't terminate (or, better: it doesn't return control to SO) in a reasonable quantum of time. I don't know even how Launch4J works, I can only suppose that it uses main() method as entry code. You should try to review your main method and verify if you can start a daemon thread there.
Richard Tookey wrote:
An SSH server running on the remote server is an agent so I suspect that what the client wants is to restrict your access much more than SSH does.
With your proposed solution you will need to have a Servlet container running on the remote computer and then you will need to be able to upload war files too it presumably using some secure agent such as SSH ! Ooops - SSH is not permitted so what to use to upload the war files?
Also, if you aim to get anything approaching the security of SSH you will need to use HTTPS with client and server side authentication.