Under windows Java calls the executable file

 origin:

  Because the interface java converted file is not found, the use of java call exe file file conversion

public  void convertFile () {
        Runtime rn = Runtime.getRuntime();
        Process p =null;
        try{
            p = rn.exec("D:/convert/Convert.exe D:/convert/my.ifc D:/convert/tmp.dae");
        }catch (Exception e){
            e.printStackTrace ();
        }
    }

Call this method, you convert the file can be achieved, and results in the execution of the same command window

 

Guess you like

Origin www.cnblogs.com/baby123/p/11018225.html