JCC is a C++ code generator that
produces a C++ object interface
wrapping a Java library via Java's
Native Interface (JNI). JCC also
generates C++ wrappers that conform to
Python's C type system making the
instances of Java classes directly
available to a Python interpreter.
When generating Python wrappers, JCC
produces a complete Python extension
via the distutils or setuptools
packages.
可以在Jython下运行当前的Python脚本吗?如果是这样,那可能是最好的方法,因为Java库可以作为可编写脚本的对象直接公开到Jython中。
否则,将列出许多解决方案here。
还有JCC在加州理工学院的网页上没有提到。
引用:
另一个答案是JPype,它允许CPython与Java对话。如果你不能切换到Jython,那就很有用了。
相关问题 更多 >
编程相关推荐