谁能解释一下这段代码中 JdClient 是什么:
public JdClient client = new DefaultJdClient("some args")
以及如何使用 Jpype 在 python 中实现这一点
它通过使用一些参数调用构造函数来创建一个public
名为client
type的变量。JdClient
DefaultJdClient
在 Python 中使用它会遵循这些思路,虽然不能确定,因为我只是粗略浏览了文档,而且我不知道 JdClient 来自哪里,所以可能需要导入那个 Java 库和根据需要引用它,就像一个人会做的那样java.lang.System.out.println('hello world')
from jpype import *
startJVM("d:/tools/j2sdk/jre/bin/client/jvm.dll", "-ea")
client = DefaultJdClient("hello world")
shutdownJVM()