I'm writing a C++ program which needs to be able to read a complex and esoteric file type. I already have a Java program for handling these files which includes functionality to convert them into simpler file formats. My idea is, whenever my program needs to read info from a complex file, to have it call the Java method to convert it to the simpler file type, then write it out to a temp file which my program can easily read. The files are small enough that performance will be acceptable. I'm writing my program in Qt and running it on a Windows Vista machine.
I've looked into using Java Native Interface, but the more I look into it the more it seems I should avoid it at all costs. Is there a better way to accomplish this, or should I continue with the JNI approach?