The Artima Developer Community
Sponsored Link

Java Answers Forum
a question about windows services

1 reply on 1 page. Most recent reply: Nov 27, 2006 5:23 AM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Feras

Posts: 3
Nickname: ferasger83
Registered: Jul, 2005

a question about windows services Posted: Nov 25, 2006 8:36 AM
Reply to this message Reply
Advertisement
i want to run a windows service from my Java application.
so can anyone told me how to do that?


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: a question about windows services Posted: Nov 27, 2006 5:23 AM
Reply to this message Reply
If you just want to start a windows service from you application, just call
Process p = Runtime.getRuntime().exec("net run \"servicename\"");

If you want to run your application as a windows service, you'll need a tool like exe4java. I don't know if there is another way.

Flat View: This topic has 1 reply on 1 page
Topic: a question about windows services Previous Topic   Next Topic Topic: Merge sort for Linked lists

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use