如何将Windows控制台应用程序与Java应用程序绑定?
我有一个用 C++ 编写并在 Windows 控制台上运行的可执行程序(.exe) 我有一个java swing应用程序,所以我希望我的java应用程序能够交互 使用控制台应用程序(发送输入并获取输出)。 但该怎么做呢?
i have an executable program (.exe) writen in c++ and run on windows console
and i have a java swing applecation , so i want my java application to interact
with the console app (send input and get output) .
but how to do that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以这样做
You can do it this way
您可以从 Java 程序中启动 C++ 程序,该程序允许您写入其标准输入并读取其标准输出。检查 Runtime 类。
You can launch the C++ program from within the Java program which allows you to write to its standard input, and read its standard output. Check the Runtime class.