title: IPC between Java and C++
body: <p>My goal here is to make two separate applications (one in Java and other in C++, both on the same machine) read from the same SQLite database. The C++ implementation already works and has all the methods that I need for that communication. It uses the sqlite3.h libraries.</p>
  
  <p>The first rational thing to do would be to use a JDBC or a SQLite wrapper in the Java application. The problem is that my embedded system (POSIX) has very limited resources and takes very long to execute a simple query when I have included the necessary *.jar into it. I have tried out the Xerial JDBC, sqlite4java, sqljet and the Javasqlite Wrapper/JDBC driver from Christian Werner. The JavaVM just takes too long to load everything and execute it and performance is a critical issue.</p>
  
  <p>As a workaround, I have managed the Java application to use system commands and run the sqlite3 command shell to execute the query and obtain the answer. I am looking for a more "stylish" and secure solution.</p>
  
  <p>I actually need the Java application to use the methods from C++. They just return a string as the methods are implemented to return only one value. After a lot of IPC reading, I have reached the conclusion that I have to use named Pipes. The thing is that I would have to use JNI but I have a beginner Java level and by this time, JNI is just too complex for me. Is JNI an overkill in this case?</p>
  
  <p>What other solution could I implement here?</p>