• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getRuntime.exec()

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic