Search code examples
javac++proxyjtapi

How can I interface with a third party module that only provides JTAPI API From C++?


I'm supporting a large system written in C++ and we now have a requirement for our application to talk with a third party system which only provides a JTAPI interface. It would appear that I am stuck writing a JTAPI proxy in Java that talks JTAPI on one side and some more language-neutral API on the other. However, this feels like it should be a solved problem and I don't want to unnecessarily re-invent the wheel. What is the best solution to interface to JTAPI from C++? Does such a proxy already exist, or perhaps is there a solution that does not require a Java layer?


Solution

  • This article shows a way to call Java objects from C++.

    You can also think of embedding the JVM in your C++ program. This page talks about a possible way to do this. Also see: Embed Java code into your native apps

    If your C++ system provides an API, then the easier approach is to write a Java program that wraps the C++ API (using JNI) and call the JTAPI library from there.