jcorrea
PSX-Place Supporter
Sorry, but I don't intend to use JNI. It's far away easier to port the code to JAVA than write the JNI interface. I would have to deal with the original C/C++ code to add the JNI specs and I really don't want to do that.Alternatively you may consider using a JNI (Java Native Interface) wrapper around existing C/C++ implementations compiled as a shared library. It could be quicker to do than a java rewrite, it would ensure specs compatibility & depending on the situation, you may even be able to avoid implementing custom serialization as a bonus. It could also make future updates/fixes in the C/C++ code easier to deploy project wide.
Taken to the extreme (you should not need that here), JNI usage can even support the introduction of cpp coding into java in the same way as we can use assembly directly in C code.
Check this app out for instance:
https://github.com/bytedeco/javacpp
Edit.: I checked the javacpp project, but it doesn't define how I need to deal with compiler directives, and as I don't really know how the javac interpret that at compiler level, I prefer to avoid that than have to discover how to do it when necessary.
Understood, thank you.Yes, it is the same.
AbstractFile class is a wrapper of the file functions.
You could create your own wrapper or use the functions directly.
The wrapper probably was created to make a standard code, and handle easier the port to different environments (Windows, linux, etc.)
Last edited: