General discussion

Locked

JAVA as a Service on WIN NT/Windows 2000

By matthew.thompson ·
HI,
Has anyone tried to get a java class to run as a service on Windows 2000/WIN NT? I've been trying, and while the program starts (log file is updated), Windows 2000 doesn't seem to realize it has started, and kills it after giving a 'did not respond' error. I'm thinking that if I want the program to run as a service, I need to alert the Service Manager that the program is up and running, but have never done this before. Any ideas?

This conversation is currently closed to new comments.

13 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by rob In reply to JAVA as a Service on WIN ...

A couple of hints to get you closer:

1. Make sure you are using version 1.3.1 or greater of the Sun JDK. Previous versions had a problem working as an NT service.

2. Check out the installing Tomcat3 as an NT service on jarkarta.apache.org. They have instructions for running tomcat as an NT service (which was written in Java).

3. There were some code libraries available to act as wrappers, but I don't remember. Some people where using these wrappers to work-around the bug mentioned in (1) so these wrappers might not be necessary. (?)

4. Post you solution here. I would like to know what you think is the best solution.

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by Shanghai Sam In reply to JAVA as a Service on WIN ...

Poster rated this answer

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by Markus Fahrni In reply to JAVA as a Service on WIN ...

Hi,
I made a test with the Windows NT Resource Kit utility SRVANY.EXE and it worked fine. Look at SRVANY.WRI for a description how to install it. In the registry I set the Application value to c:\jdk1.3\bin\java.exe and the AppParameters value to -cp <class path> <class>.

I think this is the easiest way. If you dont't want to use the SRVANY service wrapper I would try to implement a service control handler and a notification function (that calls SetServiceStatus()) in a DLL and accessing itusing the JNI.

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by Shanghai Sam In reply to JAVA as a Service on WIN ...

We've tried this several times, and I've tried it again after your message. It just doesn't seem to work.

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by gil.jensen In reply to JAVA as a Service on WIN ...

Try this web site http://www.kcmultimedia.com/javaserv/ also when the company I work for needed the same thing we decided on a third party app called java service launcer, which we found here http://www.roeschter.com/index.html. Have fun.

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by Shanghai Sam In reply to JAVA as a Service on WIN ...

This helped a little, and I kept the data for background.

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by The Chad In reply to JAVA as a Service on WIN ...
Collapse -

JAVA as a Service on WIN NT/Windows 2000

by Shanghai Sam In reply to JAVA as a Service on WIN ...

BINGO! We have a winner. This works terrific. Thanx for the assist...

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by drbillsmith In reply to JAVA as a Service on WIN ...

Matthew appears to have found his answer! For those who still need help or to better understand either JavaScript or Java 2, you may wish to consider the following low cost online courses offered by Earthnet Institute Continuing Education Department:
- JavaScript Programming for the Web
- Intro. to Java 2 Programming
- Intermediate Java 2 Programming
You may read about these courses either at
http://www.eni.edu/online_internet_courses.html or under the Internet Department on http://www.ed2go.com/earthnet.
The Java 2 Programming courses are taught by Arthur Griffith noted computer consultant and author of "The Java Master Reference, Cobol for Dummies," and "The Peter Norton Guide to Linux."

Collapse -

JAVA as a Service on WIN NT/Windows 2000

by Shanghai Sam In reply to JAVA as a Service on WIN ...

Yep, Got the answer in #4...

Back to Web Development Forum
13 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums