gistfile1.txt public static void main(String[] args) {Runtime r = Runtime.getRuntime();Process p = null;try {String s = "java -jar mybatis-generator-core-1.3.2.jar -configfile generator.xml -overwrite";p = r.exec(s);BufferedReader bufferedR
public static void main(String[] args) { Runtime r = Runtime.getRuntime(); Process p = null; try { String s = "java -jar mybatis-generator-core-1.3.2.jar -configfile generator.xml -overwrite"; p = r.exec(s); BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(p.getInputStream())); String line = null; while ((line = bufferedReader.readLine()) != null) { System.out.println(line); } } catch (Exception e) { e.printStackTrace(); } // System.out.println(System.getProperty("user.dir"));//user.dir指定了当前的路径 }mybatis-generator-core-1.3.2.jar mybatis-generator-core-1.3.2.jar