Solved

How to set up server on WinNT?

Posted on 1997-11-07
12
185 Views
Last Modified: 2012-05-04
Ok, I have everything done now, applets(and html files), mutlithreaded server. but how can I setup the server as a service which runs in the background even when I do not log on? please note: On Windows NT.

Thanks in advance.

Peggy
0
Comment
Question by:pyang051597
[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
  • 6
  • 5
12 Comments
 
LVL 5

Expert Comment

by:msmolyak
ID: 1230216
Is server a Java application?

If it is there is a sequence of steps you have to take to make it  run as an NT service. I have it documented somewhere, I'll try to find it.

Michael
0
 

Author Comment

by:pyang051597
ID: 1230217
Yes, the server is java application.

Thanks for your help

0
 
LVL 3

Expert Comment

by:eugenem
ID: 1230218
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
LVL 5

Expert Comment

by:msmolyak
ID: 1230219
I did find a write-up on how to set up a Java application as an NT service. Let me know if you want it.
0
 

Author Comment

by:pyang051597
ID: 1230220
I visited the site, but that is for FaxMail, is it possible for other applications to be setup as services? I dont want to download those files right now because it said some moves might be dangeous.  Can you give me some ideas about that?

yes, please, msmolyak, I need your help, but I dont know if you can get the credits, sorry about that.

thanks, again.


0
 
LVL 5

Expert Comment

by:msmolyak
ID: 1230221
Peggy,

1. My write-up uses steps similar to those outlined in the abovementioned Web site only they are customized fro a Java application.
2. You will need the two programs which are downloadable from that Web site (I am not sure what dangers are you talking about), they sound pretty tame to me. You are going to be modifying the NT registry but unless start deleting the keys right and left there is no danger ther either provided you follow the instructions.
3. If you feel that my answer is more relevant (complete, correct, etc) then the previous one you can always reject the original answer and let me claim the points. This is up to you.

The write up follows. It is about configuring java application called JetPort (part of JetConnect product). I am sure that your application has different name and parameters and thus disregard whatever is specific to my application and customize it for your case. (I did it while creating the write-up and it worked). Let me know if you need additional help.

Michael

--------------------------------

This file contains the instructions on how to confugure JetPort to run
as an NT service.  The following description assumes
that
- You installed JetConnect in c:\java directory;
- You have instsrv.exe and srvany.exe programs which are part of NT
Resource Kit.
Also I was able to find those utilities on the Web under the following
URL: http://www.electrasoft.com/srvany/srvany.htm.
- You are able to successfully run JetPort as a Java application under
certain user account.

The main benefit of being able to run JetPort as an NT service is that
this way JetPort does not depend on the login
sequence.  That is the users can log on and off without affecting
ability of JetPort to run on a given computer.

The disadvantages of running JetPort as a service rather than as a Java
application are inability use the JetPort Monitor
and inability to do the tracing.  The reason for that is the restriction
imposed by NT: a service can either be interactive
(have access to Console, read keyboard input, etc.) or have network
access, but not both at the same time. Clearly, JetPort
needs a network access, thus the limitations listed above.

The following steps describe the procedure of configuring JetPort as a
service.

1. Install SRVANY.EXE as an NT service by running the following command:
        instsrv <serviceName> <path to srvany.exe>, for example
        instsrv JETPORT c:\bin\srvany.exe

2. From Control Panel/Services/Startup dialog box configure the newly
insatlled service (JETPORT in out example). Set
Startup Type to Manual or Automatic as appropriate. Set Log On As to the
account under which you were able to run JetPort
as Java application.

3. Start the registry editor (REGEDT32.EXE) and find the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\JETPORT.
Create "Parameters" key under JETPORT key.  Under Parameters key create
3 values:
        Application :REG_SZ: <path to Java VM>    
        AppParameters: REG_SZ: -classpath <CLASSPATH> jet.connect.port.Main ,
where CLASSPATH contains c:\java\classes directory and classes.zip file
containing standard java libraries.
        AppDirectory: REG_SZ: <directory path>     (this should be a
directory containing the correct jetcnnct.dll as well
as license.dat file if more than one license is used).

For example,
        Application :REG_SZ: c:\java\jdk1.1\bin\java.exe
        AppParameters: REG_SZ: -classpath c:\java\jdk1.1\lib\classes.zip;c:\java\classes  jet.connect.port.Main
        AppDirectory: REG_SZ: c:\java\bin

Once the above steps are completed you should be able to run JetPort as
an NT service.
0
 

Author Comment

by:pyang051597
ID: 1230222
well, I guess I am quite dumb, I followed the steps and failed. here is what I did(my java server application is run as : java APSServer at c:\server, using jdk1.0.2):

1. instsrv NAPS c:\bin\srvany.exe
   OK
2. Control panel/services/startup & logon
   choose "automatic, System account, and Allow Service to interact with desktop".
3. Application :REG_SZ: c:\jdk1.0.2\bin\java.exe
   AppParameters: REG_SZ: -classpath    c:\jdk1.0.2\lib\classes.zip;c:\server APSServer
                                     ^^ (space?)
   AppDirectory: REG_SZ: c:\server

but when I tried to start the server on control panel/service( I clicked the start button), I got an error message: "error 002: the System cound not find the file specified."

Please help.

thanks.

Peggy
0
 

Author Comment

by:pyang051597
ID: 1230223
well, I guess I am quite dumb, I followed the steps and failed. here is what I did(my java server application is run as : java APSServer at c:\server, using jdk1.0.2):

1. instsrv NAPS c:\bin\srvany.exe
   OK
2. Control panel/services/startup & logon
   choose "automatic, System account, and Allow Service to interact with desktop".
3. Application :REG_SZ: c:\jdk1.0.2\bin\java.exe
   AppParameters: REG_SZ: -classpath    c:\jdk1.0.2\lib\classes.zip;c:\server APSServer
                                     ^^ (space?)
   AppDirectory: REG_SZ: c:\server

but when I tried to start the server on control panel/service( I clicked the start button), I got an error message: "error 002: the System cound not find the file specified."

Please help.

thanks.

Peggy
0
 
LVL 5

Expert Comment

by:msmolyak
ID: 1230224
Peggy,

Make sure all your files are where you think they are (srvany.exe, java.exe). Why did you choose system account. Try running it under your own (I assume that's where you normally run your server). Make sure your Registry structure is correct. (Tha is you have Parameters key with three values). Try adding c:\server and c:\bin to the path under the account you use to run.

Michael
0
 

Author Comment

by:pyang051597
ID: 1230225
Thanks for your quick response, I add those 2 files to c:\server and it worked! thanks:)

I have one last question: how to delete disabled server from control panel/service? I just re-setup my server and decided to use a new name, but at last I found I cannot delete the old one.

again, thanks, sorry eugenem, I have to give the credits to michael, although the web site you suggested was the right one.
 
0
 

Author Comment

by:pyang051597
ID: 1230226
i already remove the old service by using "instsrv .. remove", thanks.

I am going to close this question, michael, please say sth here so I can give you the credits.  btw, how useful are the credits?
I know they are useful for asking Qs, but for experts?

again, I appreciate your help.

peggy

0
 
LVL 5

Accepted Solution

by:
msmolyak earned 70 total points
ID: 1230227
Those points are useful mainly as ego boosters (by the way I cannnot use my expert points to ask questions). The Experts Excahnge claim that if you collect many-many expert points you become a paid expert (they sort of knight you). I am not holding my breath though.

Glad to be of assistance.

Michael
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

707 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