please tell me how I can execute c++ program frm java
I had tried this one but it does`t work
/*import java.io.*;
public class exe1
{
public static void main(String[] arg)
{
try
{
Runtime rt = Runtime.getRuntime();
//int s=rt.availableProcessors();
Process prcs =rt.exec("inventry.exe");
InputStreamReader isr =new InputStreamReader(prcs.getInputStream());
BufferedReader br = new BufferedReader(isr);
String line;
while((line=br.readLine())!=null)
System.out.println(line);
}
catch(IOException ioe)
{
System.exit(0);
}
}
} */
thanks sahil