Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to start a java application as windows 2000 service?

843798Jan 9 2004 — edited Jan 9 2004
Hi all,

I'm trying to start / stop a java application as a windows 2000 service. But nothing appens (I can see the screen that rapidly display the java help prompt and then disappear)

I've a working directory i.e C:\MyDir and it contains instsrv.exe, srvany.exe and my application jar MyApp.jar

I'm using instsrv.exe to register a java application as a service ( C:\MyDir\instsrv MyApp C:\MyDir\srvany.exe )

I've added a key in registry by running regedit
The key is under the tree HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyApp

the key value is Parameters
in the key I've added a string value "Application" with the value "C:\j2sdk1.4.2_01\bin\java.exe"
and a string value "AppParameters" with the value "-classpath C:\MyDir\MyApp.jar main" where main is the name of the main class application.

This seems to run correctly with Windows NT 4.0
But doesn't work with Windows 2000.

Can anyone help me?? pls.

Thanks.

Max
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2004
Added on Jan 9 2004
1 comment
149 views