简体   繁体   中英

Calling a C, C++ program from Java

Is it possible to call C or C++ code from a Java Code, i can re-write the code in Java, but need to reuse the existing code..

Thanks

Yes, it's possible using the Java Native Interface .

I'd say that JNA or Java Native Access is easier to use. It's built on JNI, but there's no need to create a header file. Instead just call from the dll: Java Native Access

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM