java调用自己编写的.exe程序

版权声明:本博文仅供学习、参考、技术讨论,版权归笔者/译者所有。 https://blog.csdn.net/qq_38025219/article/details/83017307
       Runtime rn = Runtime.getRuntime();
	   Process p = null;
	   try {
	   p = rn.exec("\"F:/export/qq.exe\"");//软件存放地址的问题
	   } catch (Exception e) {
		 System.out.println("Error exec!");
		 return 1;//调用失败
	   }
		 return 0;//调用成功

猜你喜欢

转载自blog.csdn.net/qq_38025219/article/details/83017307