Pergunta

I have a C++/Qt application. I want to talk to it using Java. I know I can create TCP server/client. What other options do I have?

The problem is that I created TCP server inside the application and it does not work. But works fine when run in standalone mode. So looking for alternatives ways of communication between C++ and Java.

Foi útil?

Solução

I have a C++/Qt application. I want to talk to it using Java. I know I can create TCP server/client. What other options do I have?

Basically, what you are looking for is IPC that is supported by both languages properly. You can find several solutions out there:

I would personally suggest to use raw socket based low-level solution with the Qt API. This is the most reliable in my opinion, and well-proven technology behind. There is Qt Jambi with Qt style API for the java side, and then of course in C++, you will get the QtNetwork API. This would at least provide you some consistency throughout the projects.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top