JPython-C++
C.Laurence Gonsalves
clgonsal at keeshah.penguinpowered.com
Fri Sep 3 12:59:18 EDT 1999
On Fri, 3 Sep 1999 12:48:49 GMT, Adrian Eyre <a.eyre at optichrome.com> wrote:
> Is there any way of embedding/extending JPython/Java in/with C/C++?
>
> I need to be able to use a C++ extension module with JPython, and/or
> embed JPython into C++. Is there any way to achieve this? I don't
> care how hacky it is, providing it works.
Use JNI (Java Native Interface).
- create a class in Java with methods marked as native.
- use javah to make your skeleton code
- implement your native methods in C or C++
You can use any Java class from JPython, even Java classes with native
methods.
--
C. Laurence Gonsalves "Any sufficiently advanced
clgonsal at kami.com technology is indistinguishable
http://www.cryogen.com/clgonsal/ from magic." -- Arthur C. Clarke
More information about the Python-list
mailing list