Sep 25, 2001 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 hwo can I excute a unix shell Script in Java Code ??
Sep 25, 2001 #2 wushutwist Programmer Joined Aug 3, 2000 Messages 984 Location US Pretty easy. Here is a really simple example: Code: String shellCommand; /* Set your command here */ Runtime rt = Runtime.getRuntime(); rt.exec(shellCommand); Note: You can do much more with this, such as retrieving and parsing the output of the command. This should be enough to get you started. Wushutwist Upvote 0 Downvote
Pretty easy. Here is a really simple example: Code: String shellCommand; /* Set your command here */ Runtime rt = Runtime.getRuntime(); rt.exec(shellCommand); Note: You can do much more with this, such as retrieving and parsing the output of the command. This should be enough to get you started. Wushutwist