I've implemented support for two-way compatibility between Java and Python/CPython, meaning that Java can import standard CPython modules and use code as if it were Java, and Python can import Java classes and use them as if they were Python classes.Imports in both languages are done with standard import statements.Java code imported into Python is subjected to reflection and then Python wrapper classes are generated using the Python API that provide runtime translations between the two language runtimes.  A native Python module is provided that provides the "magic import" functionality from Java to Python ( code imported into Java is introspected using the Python C API and then bytecode is generated for Java wrapper classes that provide a similar runtime translation as the imports in the other direction.  A custom compiler based on javax.tools ( is provided ( as well as runtime dynamic code generation support for wrapper APIs in a custom class loader ( - more info here:  idea is to facilitate the mixed use of enterprise technologies (Java) and AI / data science technologies (Python).All of the source code required has been released under permissive open source licenses (MIT).I hope it could be interesting and useful for someone - happy to provide more information if there's interest.