Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

python

boost

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 wondering if there's something equivalent to Boost::Python, but targeting Java.

like image 570
gct Avatar asked Feb 10 '26 08:02

gct


2 Answers

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.

like image 183
Jonathan Feinberg Avatar answered Feb 13 '26 02:02

Jonathan Feinberg


I think SWIG can also be a choice.

like image 37
sateesh Avatar answered Feb 13 '26 01:02

sateesh