File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getRuntime.exec()

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1141
1
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic