I am trying to compile c file through java code using exec method
String inputFilePath = "\"D:\\Soft\\WebApplication\\build\\web\\code\\Demo.c\"";
String[] commands = {"cmd", "/c", "gcc",inputFilePath,"-o","Demo"};
Process p=Runtime.getRuntime().exec(commands);
DataInputStream din=new DataInputStream(p.getErrorStream());
String s="",temp;
while((temp=din.readLine())!=null)
s+=temp;
if(s.equals("")){
cf.setResult("No Syntax Error");
}
else
cf.setResult(s);
but it is not generating demo.exe
file