• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invoke Java library from C/C++

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,


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


Thanks in advance,
George
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
George Lin
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic