本文介绍了将信息从java传递给c ++的最好方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
/java.sun.com/docs/books/tutorial/networking/sockets/\">java socket tutorial或c ++ socket tutorial你有很多信息。 I have a java application I need to pass some info to a C++ program. It has been suggested that I use some simple socket programming to do this. Is this the best way? If not what are the alternatives? If so, how should I go about learning about socket programming?
解决方案
You have a few options:
- Pass a file from Java to C++. This is probably simplest. It's easy to test and shouldn't require any 3rd party libraries on either end.
- Use sockets as mentioned. In C++, if you require a cross-platform solution a library such as ACE or boost will save you some heartache
- Use JNI to call from Java to C++ or vice versa. This is probably the most difficult, but most performant.
For learning sockets, a Google search for "java socket tutorial" or "c++ socket tutorial" will give you lots of information.
这篇关于将信息从java传递给c ++的最好方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!