本文介绍了从Java应用程序启动应用程序C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi everyine! 我有2个应用程序,一个用C ++编码,另一个用java编码,我想用另一个编译用c ++编写的应用程序,我真的不知道该怎么做 关于那个的任何想法??? 非常感谢你的任何帮助
hi everyine! I have 2 applications one coded in C++ and the other coded in java, i want to launch the one coded in c++ from the other one, honnestly i dont know how to do it at all any ideas about that??? thank YOU very much for any help
推荐答案你想向Google询问运行时间 [ ^ ]。以下是我用来做这类事情的一些代码: You want to ask Google about Runtime[^]. Here is some code I use to do that kind of thing: protected Process DoSysCommand(String sCmd, boolean bWait) { Runtime r = Runtime.getRuntime(); Process retP = null; try { retP = r.exec(sCmd); if(bWait) { retP.waitFor(); } } catch(IOException e) { System.err.println(e.getMessage()); } catch(InterruptedException e) { System.err.println(e.getMessage()); } return retP; }
更多推荐
从Java应用程序启动应用程序C ++
发布评论