This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Iam trying to execute a command by java wihout using command prompt.....and in that i need to set the directory also.
i tried all most all codes i know but all are failed....can any one gimme a suggestion plzz
My code is:
public class FinalCP
public static void main(String args)
Process p=Runtime.getRuntime().exec("cmd C:\Java\jdk1.5.0_19\bin jar xf epic.jar");
//red color text is directory structure i have to set and green is command i want to execute
BufferedReader reader=new BufferedReader(new InputStreamReader(p.getInputStream()));