Jump to content

Java Support by JavaCPP or swig ?


photo

Recommended Posts

Hello , it will be great if any java wrapper will be avalible on unigine

 

There are 2 easy integration techniques for java

1-) JavaCPP: This is great framework.Because JavaCPP is not just converting java to JNI , it can also work on RoboVM.

RoboVM is framework for Java that supplies IOS code over Java.

 

JavaCPP provides efficient access to native C++ inside Java, not unlike the way some C/C++ compilers interact with assembly language. No need to invent new languages such as with SWIGSIP,C++/CLICython, or RPython as required by cppyy. Instead, it exploits the syntactic and semantic similarities between Java and C++. Under the hood, it uses JNI, so it works with all implementations of Java SE, in addition to AndroidAvian, and RoboVM (instructions).

 

JavaCPP produces code that has *zero overhead* compared to manually coded JNI functions (verify the generated .cpp files to convince yourself). Moreover, at runtime, the `Loader.load()` method automatically loads the native libraries from Java resources, which were placed in the right directory by the building process. They can even be archived in a JAR file, it changes nothing.

 

https://github.com/bytedeco/javacpp

 

another solution is swig.

But swig is not efficient as JavaCPP

 

 

With that way it will be very easy to make java wrapper for unigine.

Thats just my idea.

I hope it may help you for something.

Link to comment
×
×
  • Create New...