How to incorporate the C/C++ code in Java?

Guys,Does any one here knows about in incorporating the C/C++ code in java?Or know about to call the C/C++ code in java?Guys, please impart your knowledge to me...Thanks,Mercy
[217 byte] By [mespedila] at [2007-11-27 7:48:20]
# 1
look for JNI api
calvino_inda at 2007-7-12 19:29:11 > top of Java-index,Java Essentials,Java Programming...
# 2
Hi,Where can I find that API? Is it a third party?Currently I am using the 1.6 API...Thanks,Mercy
mespedila at 2007-7-12 19:29:11 > top of Java-index,Java Essentials,Java Programming...
# 3
what about a quick google search for "sun JNI" :p
calvino_inda at 2007-7-12 19:29:11 > top of Java-index,Java Essentials,Java Programming...
# 4
it is specification , u may need third party tools to compile and create library of C/C++ code.read this http://java.sun.com/j2se/1.5.0/docs/guide/jni/index.html Vijay
bhvijaya at 2007-7-12 19:29:11 > top of Java-index,Java Essentials,Java Programming...
# 5
calvino_ind,You are right, the best anwer is google but what I mean is tha, is it included in the sdk API?It is another java tool.Well anyway, I already find it in the API.. Thanks,Mercy
mespedila at 2007-7-12 19:29:11 > top of Java-index,Java Essentials,Java Programming...
# 6

JNI is built right into the JVM - in fact some of the most fundamental of the library classes use it to get access to the operating system.

You package your C and C++ into a DLL (windows) or shared library (unix) to which you connect with a System.loadLibrary() call.

To create the hooks, you declare special methods native. Then you run the classes with native methods through the javah comand to generated C headers declaring the methods to which the java connecfs.

malcolmmca at 2007-7-12 19:29:11 > top of Java-index,Java Essentials,Java Programming...