Java 如何在WebSphere';jython是谁?

Java 如何在WebSphere';jython是谁?,java,websphere,jython,Java,Websphere,Jython,运行websphere的Jython时,我无法调用AdminControl命令 Jython 2.1 on java1.6.0 (JIT: j9jit26) Type "copyright", "credits" or "license" for more information. >>> cellName = AdminControl.getCell() Traceback (innermost last): File "<console>", line 1,

运行websphere的Jython时,我无法调用AdminControl命令

Jython 2.1 on java1.6.0 (JIT: j9jit26)
Type "copyright", "credits" or "license" for more information.
>>> cellName = AdminControl.getCell()
Traceback (innermost last):
  File "<console>", line 1, in ?
NameError: AdminControl

你不能。AdminControl对象由内部类型支持,并且在启动时由wsadmin注册。使用它的唯一方法是通过wsadmin-lang jython(可能是使用
-f script.py

"$WAS_8_5_HOME"/java/jre/bin/java.exe -jar "$WAS_8_5_HOME"/optionalLibraries/jython/jython.jar