Solved

adding java class file as NT Service

Posted on 2001-06-11
9
236 Views
Last Modified: 2010-04-16


How can I add a java class file as NT Service so that it will start automatically when the system is restarted.Thanx in advance.

Sasikumar Rohithasha.

0
Comment
Question by:sangeet24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 

Expert Comment

by:offerm
ID: 6177811
Use Invoker.exe to register your program as a windows NT service.

http://www.idetix.com/support_files.htm

Invoker is a free administrative and development command line utility for Microsoft Windows NT 3.51/4.0 (Intel) that creates a registered service out of (most) applications that can be launched by the command line.

0
 

Author Comment

by:sangeet24
ID: 6177953
I need others comments also in this.Your answer is good but i want to unlock the question.
0
 

Author Comment

by:sangeet24
ID: 6177956
I need others comments also in this.Your answer is good but i want to unlock the question.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:sangeet24
ID: 6177959
I need others comments also in this.Your answer is good but i want to unlock the question.
0
 
LVL 2

Accepted Solution

by:
venkat2000120699 earned 100 total points
ID: 6178026
Go to the page: http://www.javaworld.com/javaworld/tools/jw-tools-util.html

and search for ServiceRunner on that page.  U can download a utility which runs any Java application as a service on Windows NT.
0
 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 6178089
Which solution is applicable to your problem depends in part on your specific requirements.

Do you need for your java application to participate in Service Control Manager (SCM) stop requests. Many of the solutions, like ServiceRunner mentioned above and Microsoft's srvany utility, do not provide for this. We needed our services to shutdown gracefully and so could not choose these solutions.

After evaluating several available packages, we came across JavaService from Alexandria Software. This is a free, open-source, native NT executable that provides for registration specifically of Java applications as NT services. It is not a "run anything" invoker. It is intended for Java applications. As such, it provides command line options used at registration to specify such things as current directory, redirection of System.err and System.out to files, additional directories to be appended to the system PATH, and specification of JVM options. This flexibility was critical to us. In addition, JavaService permits specification of both a start class (the one containing main or a similarly declared start method) and a stop class and method to be called when the SCM requests service stop. This permits (but does not require) that your Java application participate in a graceful shutdown. It is also useful that the application can be renamed so that it will have a unique name in Task Manager -- important should you need to run multiple services on the same system. It also logs info and error messages to the NT Event Log.

As an endorsememt, I must state that my team has had great success with the package. We had test services installed in literally minutes because of the ease of use and flexibility it offers. It is the only product we have found to date which allows us to run WebSphere EJB client Java applications as NT services.

The package and related documentation can be retrieved from:
    http://www.alexandriasc.com/software/JavaService/index.html

Best regards,
Jim Cakalic
0
 
LVL 3

Expert Comment

by:superschlonz
ID: 6178429
I'm using JavaService which you can get from
http://www.alexandriasc.com/software/JavaService/download.html
You can also download the source so you can make modifications if needed.
I had to enhance it for running TomCat as a servi. The CLASSPATH got too
long for it.
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6180337
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question