Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.lang.*;
- public class bengbeng{
- public static int compex(String cmdline){
- int i=5;
- try {
- Process cmdproses = Runtime.getRuntime().exec(cmdline);
- // BufferedReader input = new BufferedReader(new InputStreamReader(cmdproses.getInputStream()));
- //cmdproses.exec();
- i=cmdproses.exitValue();
- }
- catch (Exception ex) {
- ex.printStackTrace();
- }
- return i;
- }
- public static void main(String[] args){
- String c="g++ -g D:/Della/wewew.cpp -o haiya2.exe";
- bengbeng b=new bengbeng();
- int a=b.compex(c);
- System.exit;
- }
- }
Add Comment
Please, Sign In to add comment