aspose file tools*
The moose likes Beginning Java and the fly likes Invoke Java library from C/C++ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Invoke Java library from C/C++" Watch "Invoke Java library from C/C++" New topic
Author

Invoke Java library from C/C++

George Lin
Ranch Hand

Joined: Jan 11, 2005
Posts: 125
Hello everyone,


Are there any approaches to invoke Java libraries from C/C++?


Thanks in advance,
George
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1815
Yes; do a google search for JNI (Java Native Interface). It allows Java to call C/C++ code, and (for your purposes) it allows C/C++ code to call Java.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
George Lin
Ranch Hand

Joined: Jan 11, 2005
Posts: 125
Thanks Joel,


Originally posted by Joel McNary:
Yes; do a google search for JNI (Java Native Interface). It allows Java to call C/C++ code, and (for your purposes) it allows C/C++ code to call Java.


I only know we can use JNI to invoke native libraries from Java and I have never used JNI to invoke Java libraries from native applications (C/C++ programs). I am going to look through JNI as you recommended.

Another question, do you know how JNI is implemented internally by JVM?


regards,
George
[ April 04, 2005: Message edited by: George Lin ]
 
Don't get me started about those stupid light bulbs.
 
subject: Invoke Java library from C/C++
 
Similar Threads
Invoking java methods from C#
how to invoke outlook express and post the data into it using java or c++
invoking c exe from java
how to invoke jvm fro c++
how to invoke HttpRequest from a C code?