Can anybody explain what does JdClient is in this code:

public JdClient client = new DefaultJdClient("some args")

and how to implement this in python with Jpype

有帮助吗?

解决方案

It creates a public variable named client of type JdClient by calling the DefaultJdClient constructor with some arguments.

To use it in Python would be something along these lines, although can't be certain as I just did a cursory glances over the documentation, and I have no idea where JdClient comes from so there might be a need to import that Java library and reference it as needed, like one would do 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() 
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top