0
我正在运行Jython shell。我试图在shell中使用几个Java类,因为我对使用Jython实现有点新。但是,例如,当我尝试创建一个对象时,我得到以下Traceback。在Jython中创建Java对象时没有可见的构造函数
>>> s = java.lang.annotation
>>> s.Annotation()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: No visible constructors for class (java.lang.annotation.Annotation)
我读this question并试图编辑python.security.respectJavaAccessibility
线在我的Jython注册表等于false
,但是这无济于事。
什么可能导致这种情况发生?