Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Hello, but do you know how to manipulate NT Services in Java??  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is:
If a certain NT service starts, pauses or stopped by user, is there any possible for another Java application to detect that??
Or we can say that the question boils down to how to use Java to start, pause and stop a service that registered on NT.
Any one be helpful will be greatly appreciated.
 
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can run a .bat file from your Java app to start, stop, pause, whatever. Check out the 'net' command on the DOS prompt. For example: 'net start "My Service"' I don't know about checking to see if a service is running, but there probably is a way. Anyone else? Hope this helps!

Barry
 
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would guess that you need to do this with some MicroSoft tools/Code and integrate it into your Java application using some JNI.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!