Guest User

Untitled

a guest
May 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. import java.io.*;
  2. import java.lang.*;
  3.  
  4. public class bengbeng{
  5. public static int compex(String cmdline){
  6.     int i=5;
  7.     try {
  8.         Process cmdproses = Runtime.getRuntime().exec(cmdline);
  9.         // BufferedReader input = new BufferedReader(new InputStreamReader(cmdproses.getInputStream()));
  10.         //cmdproses.exec();
  11.         i=cmdproses.exitValue();
  12.         }
  13.     catch (Exception ex) {
  14.         ex.printStackTrace();
  15.     }
  16.     return i;
  17. }
  18. public static void main(String[] args){
  19.     String c="g++ -g D:/Della/wewew.cpp -o haiya2.exe";
  20.     bengbeng b=new bengbeng();
  21.     int a=b.compex(c);
  22.     System.exit;
  23. }
  24.  
  25. }
Add Comment
Please, Sign In to add comment