How to use c/c++ code in JAVA
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / manchu
yes the above answer ids write but when i try to run the c
file i got an error as
'cl' is not recognized as an internal or external command,
operable program or batch file.
can anyone tell me whether i should include any directory
path ..
otherwise please tell me the steps that should be done
before running the c file
Is This Answer Correct ? | 10 Yes | 2 No |
Answer / henk
What did you said?
why to run back in c/c++ when u r using java which includes
All the features of c/c++
C is much "deeper in the machine" than Java. In C, you can ask the value of a place in your memory wich you like. There are no boundry's!(well, windows don't like it, lets use the pingiun). Pointers are realy great and usefull, and C provide them. Java and pointers? Imposible!
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / guest
basically c is similar to java than c++, its better to use
the code in c which is very similar to java...
Is This Answer Correct ? | 19 Yes | 20 No |
Answer / gaurav
why to run back in c/c++ when u r using java which includes
All the features of c/c++
Is This Answer Correct ? | 6 Yes | 7 No |
What is n in c?
What is pointer & why it is used?
Write a c pgm for leap year
11 Answers College School Exams Tests, IBM, TCS,
Explain the difference between structs and unions in c?
what defference between c and c++ ?
i want to know aptitude questions,technical questions
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
how to add numbers without using arithmetic operators.
1,4,8,13,21,30,36,45,54,63,73,?,?.
10 Answers AMB, Franklin Templeton,
Is main() is used in the program,,see below example? void main() { int i; for(i=0;i<10;i++) main(); } Then what is the output of the program?
What is the output of the program given below #include<stdio.h> main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
21 Answers ADITI, Student, TCS,
What are terms in math?