aspose file tools
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


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executing Unix command from java" Watch "Executing Unix command from java" New topic
Author

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?


$Hi/\bEr
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40474
    
  28
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.
 
Don't get me started about those stupid light bulbs.
 
subject: Executing Unix command from java