Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

executing a C call within java program

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How do i call and parse data into a c program within a java program? I know it can be done, because some other people have told me it can be done, but they don't know how.
 
Hi,

Do u want to call u r .c file or .exe file. If u want to call an .exe file then u can use

Runtime.exec(&quot;<filename with path>&quot;);

If u want to use your .c file as it is, JNI(Java Native Interface) is the only solution.

bye
 
Cheers for that, the JNI seems like what i am after. All i have to do now is learn how to implement it.

:(
 
Use JNI is Correct. First Create DLL or Object file then using System.loadLibrary to load the DLL and call it using native method.


Shyam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top