Reputation: 10159
My major program is written in Python 2.7 (on Mac) and need to leverage some function which is written in a Java 1.8, I think CPython cannot import Java library directly (different than Jython)?
If there is no solution to call Java from CPython, could I integrate in this way -- wrap the Java function into a Java command line application, Python 2.7 call this Java application (e.g. using os.system
) by passing command line parameter as inputs, and retrieve its console output?
regards, Lin
Upvotes: 0
Views: 230
Reputation: 139
A number of open source projects have been written to enable calling Java from CPython, depending on your needs.
Upvotes: 0
Reputation: 7750
Jython
.Upvotes: 1