Process p = Runtime.getRuntime().exec("C:\\tc\\bin\\" + prog_name , null);
BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getInputStream()));
System.out.println("Here is the standard op :\n");

i have this code can anyone tell me how to run c program using java
thanks !

What happens when you execute your program?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.