How to call java objects and functions from CPython?
问题 I have a python program, which runs on the CPython implementation, and inside it I must call a function defined in a java program. How can I do this? It would be nice to be able to use some java objects too. Jython is not an option. I must run the python part in CPython. 回答1: The easiest thing to do is Write a trivial CLI for your java "function". (There's no such thing, so I'll assume you actually mean a method function of a Java class.) public class ExposeAMethod { public static void main(