【问题标题】:How do I import AdminControl in WebSphere's jython?如何在 WebSphere 的 jython 中导入 AdminControl?
【发布时间】:2015-09-30 21:55:57
【问题描述】:

在运行 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

我没有看到来自 IBM 或其他地方的任何东西表明需要导入 AdminControl,所以我不确定为什么上述方法不起作用。

注意事项
WebSphere 8.5
我正在使用以下命令运行 jython:

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

【问题讨论】:

    标签: java websphere jython


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-16
      • 1970-01-01
      • 2012-10-24
      • 1970-01-01
      • 2012-07-26
      • 1970-01-01
      • 1970-01-01
      • 2014-08-13
      相关资源
      最近更新 更多