从Java应用程序启动应用程序C ++

编程入门 行业动态 更新时间:2024-10-28 15:20:24
本文介绍了从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 ++

本文发布于:2023-11-02 13:08:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1552486.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!