0

I would like to run the net start and net stop command from java and fetch the results in java to administrate my services from there. But I have no idea how to do that. Any Examples or Tutorials?

Niklas
  • 64
  • 1
  • 8

1 Answers1

1

I think you can check below links. It may help you in executing the cmd commands from Java code.

  1. http://www.codejava.net/java-se/file-io/execute-operating-system-commands-using-runtime-exec-methods

  2. http://www.mkyong.com/java/how-to-execute-shell-command-from-java/

  3. Run cmd commands through java

Community
  • 1
  • 1
pbajpai
  • 1,303
  • 1
  • 9
  • 24