开发者

Is there an equivalent to Boost::Python for Java?

开发者 https://www.devze.com 2022-12-14 07:04 出处:网络
I\'ve been working with Boost::Python to expose some high-performance code to python recently, and it\'s just a dream to work with.I\'d like to be able to maintain a single C++ codebase and expose it

I've been working with Boost::Python to expose some high-performance code to python recently, and it's just a dream to work with. I'd like to be able to maintain a single C++ codebase and expose it to Python via Boost, and to Java as well. I know about JNI, but I was wonder开发者_StackOverflow社区ing if there's something equivalent to Boost::Python, but targeting Java.


There are a number of Java projects that let you call functions exposed in DLLs without writing JNI wrapper code. These include J/Invoke, NativeCall, xFunction, JNA, and others.


I think SWIG can also be a choice.


Another possibility is javacpp. I never used it myself, but it seems a better fit than JNA to my C++ code base.

0

精彩评论

暂无评论...
验证码 换一张
取 消