Connecting Tech Pros Worldwide Forums | Help | Site Map

Executing windows system calls through java

Newbie
 
Join Date: Dec 2007
Posts: 6
#1: Dec 12 '07
i need to execute system calls of windows on remote machine in a LAN.
how can i do so using java ?
Newbie
 
Join Date: Nov 2007
Posts: 4
#2: Dec 13 '07

re: Executing windows system calls through java


Quote:

Originally Posted by swatibksh

i need to execute system calls of windows on remote machine in a LAN.
how can i do so using java ?

To make a system call on the local machine use this code:

Process process = Runtime.getRuntime().exec("SYSTEM_COMMAND");

where SYSTEM_COMMAND is anything you would write in the command prompt. For example: ping google.com

Writing system calls to another windows computer via the computer you are running your java script on is more a Windows question, unless you want to set up a java server on the remote windows machine to forward the system calls.

Which way you do it is up to you.
Reply