Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent! Java as Windows Service

 
Karthik Veeramani
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to convert a Java application to W2k Service. Where can I download Microsoft SDK for Java (I googled it but most of the links were broken). Please let me know asap.
 
Vasudha Komaravolu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can create Java Application Application as an NT service using instsrv.exe and srvany.exe
Steps to do so
1. instsrv SampleService srvany.exe
2. Create parameters with regedt32 under: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parameters
AppDirectory: d:\Sample
Application: c:\jdk1.3\bin\java.exe
AppParameters: -classpath com.sample.SampleService
Here SampleService is the service Name and
D:\Sample is the path where SampleService.class file exists and C:\jdk1.3\bin\java.exe is the path where java is installed and com.Sample.SampleService is the class file which u want to make it as a service.
com.sample is that package. That should be in the classpath.
Hope this solves your problem.
you can find the instsrv.exe and srvany.exe.
 
Karthik Veeramani
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for that, but I have some doubts. Where do I get these 2 files. and also, these files only launch ur app, and dont convert them into service. I want all my class files packed into a single exe, which I can install as service. Is there a way out?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic