Java is the third programming language supported by OEChem. Like Python, the Java version of OEChem is a JNI (Java Native Interface) wrapper created using SWIG. Using SWIG allows a Java class hierachy and API that mirrors both the C++ and Python API.
It is important to note that this is not a new version of OEChem written in Java nor is it a Java interpretation of the OEChem API, but a rather faithful reproduction of the OEChem API in Java. As such there are some features that might not be as Java-like as a toolkit written entirely in Java, but most of these are minor issues and consistency with the C++ and Python makes translation from one to another relatively easy and greatly enhances our ability to support all three versions.
A few of these idiomatic differences include:
oechem.
operator bool() is mapped to a member function
called IsValid(), operator() is mapped to call() and
operator() const is mapped to constCall().
A Java version of OEChem allows integration of OEChem into Java desktop and server-side applications. However, Java-OEChem is not necessarily suited for applet programming since it requires native code and platform-specific shared libraries.