6

image Calling Java from C Language

You may have some utilities written in Java that you want to embed into an application written in C. Sometimes it is worth the effort to translate or port the code from one of these languages to the other. Then, everything is running wholly in Java or C. Occasionally it isn’t worth it, or perhaps you have a Java application but no source for it.

The big difficulty here is that you need to construct a Java environment and run up a VM for it to execute the Java code in. This not hard and there is some online advice about how to do it. Search Google using the string “calling Java from C” will yield many helpful articles. ...

Get Developing Quality Metadata now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.