Is it possible to use Java APIs within a 'C' program?

Alexander Krapf

Yes, you use JNI for that purpose, in particular a part of JNI which is called the invocation interface. Through the invocation interface, you can start a JVM from C or C++ and then use JNI to create objects, call methods, access fields etc.

JNI is well documented in the JNI tutorial and two good books (Essential JNI by Rob Gordon and The Java Native Interface by Sheng Liang). It is also very hard to use and maintain.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact