No I can't, unless you answer the questions I ask. Why do you want to do the I/O in Java, pass it to JNI, and then to C++? If you already have your C++ interface, all you have to do is meet that. If you haven't, and you're designing it here, I don't understand why you want to it it the way you are planning. Why can't you just pass the file name as I suggested?