wood burning stoves 2.0*
The moose likes Java in General and the fly likes Executing Unix command from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executing Unix command from java" Watch "Executing Unix command from java" New topic

Executing Unix command from java

Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252
I am trying to execute an unix command using

Process p = Runtime.getRuntime().exec("");

Before executing it, how do i define the credentials and the hostnames?

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 37970
Don't know. How do you identify the credentials when you run it from the command line? Don't go anywhere near Runtime.exec() until you have read Michael Daconta's classic article when Runtime.exec() won't.
jQuery in Action, 2nd edition
subject: Executing Unix command from java
Similar Threads
Deleting a file from server
I m not able to print out.println on target iframe
not able to execute a repquota command on a bash shell
handling Java child process execution
oracle on unix