Originally posted by Ernest Friedman-Hill:
A Java program can directly invoke C++ code right inside the Java program by using a tool called the Java Native Interface (JNI) (see here.)
JNI works both ways: you can use it to call Java from C++, too.
Note that Java cannot be called without a JVM running to host the Java. However, JNI includes the Invocation Interface, for starting a JVM from C++.