i'm trying to run cmd.exe in jira for which i have written the following code in java.
package com.atlassian.plugin.cli;
import com.atlassian.jira.web.action.JiraWebActionSupport;
public class RunCliComponent extends JiraWebActionSupport{
/**
*
*/
private static final long serialVersionUID = 1L;
public String doDefault() throws Exception {
try{
Process p = Runtime.getRuntime().exec("cmd /c start cmd");
System.out.println("******");
System.out.println("test");
System.out.println("******");
}catch(Exception ex){
System.out.println(ex);
}
return INPUT;
}
}
but i get an error
java.io.IOException: Cannot run program "cmd": java.io.IOException: error=2, No such file or directory
where am i going wrong?