How to use c/c++ code in JAVA

Answer Posted / jaya prakash

Java Native Interface
is only correct ans.
it provide JNI.H header file.

only use method in java.
then
use the run command
javah -jni classname,
it creates classname.h header cpp file
we produce classname.cpp file
and
use run command
cl /LD classname.cpp

it produces .dll file

then
we compile and run java file
without using these steps u can't compile or run it.it
produces error because the method used in java is not
defined,,,

Is This Answer Correct ?    25 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What kind of structure is a house?

546


How does struct work in c?

600


Explain what is dynamic data structure?

636


What are the features of the c language?

636


What are the advantages of using new operator as compared to the function malloc ()?

746






What is difference between arrays and pointers?

573


What is use of #include in c?

587


I need a sort of an approximate strcmp routine?

648


What are the difference between a free-standing and a hosted environment?

733


What is the role of && operator in a program code?

560


How many data structures are there in c?

609


What is structure padding and packing in c?

608


How to declare a variable?

560


Explain the process of converting a Tree into a Binary Tree.

2094


Does c have class?

604