File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "getRuntime.exec()" Watch "getRuntime.exec()" New topic


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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) {
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: 1141

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,
I agree. Here's the link:
subject: getRuntime.exec()
It's not a secret anymore!