aspose file tools*
The moose likes Beginning Java and the fly likes getRuntime.exec() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "getRuntime.exec()" Watch "getRuntime.exec()" New topic
Author

getRuntime.exec()

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hello
i try to execute a linux script from a java servlet.
here is my code:
Process p = Runtime.getRuntime().exec(net files);
BufferedReader input =
new BufferedReader(new InputStreamReader(p.getInputStream()));

while ((line = input.readLine()) != null) {
System.err.println(line);
I work under wsad5 windows2000, and it works well.
But when I try it under a was5 server (linux) with the commande rexec -l username -p password machine net files, that doesnt work
I have a daemon rexecd running on the remote machine (windows2000)
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1135

Hi Jose,
I'm not sure if this will help you, but in case you don't already know about it, I suggest reading the following JavaWorld article:
When Runtime.exec() won't
Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getRuntime.exec()