Вопрос

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