2013-08-26 39 views
0

我正在使用Websphere 8 Thin Client連接到我的遠程WAS實例。如何將Jython模塊傳遞給wsadmin工具

我想通過傳入python.pathwsadmin來導入一些Jyton文件,但它找不到它們。我繼續在Jython類上打NameError

C:\MyThinClient>wsadmin -host <ipaddress> -port 8880 -lang jython -javaoption "-Dpython.path=C:/MyThinClient/Jython/" 

WASX7209I: Connected to process "server1" on node XYZNode01 using SOAP connector; The type of process is: UnManagedProcess WASX7031I: For help, enter: "print Help.help()" wsadmin>AdminApplication.listApplications() WASX7015E: Exception running command: "AdminApplication.listApplications()"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback (innermost last): File "", line 1, in ? NameError: AdminApplication

傳遞的路徑包含AdminApplication.py文件。 我試過用反斜槓和正斜槓傳遞Jython路徑,但沒有快樂。有任何想法嗎?

回答

1

嘗試使用選項-Dwsadmin.script.libraries,如下所示。它的工作對我來說

C:\ MyThinClient>的wsadmin -host -port 8880 -lang Jython的-javaoption 「-Dwsadmin.script.libraries == C:/ MyThinClient/Jython的/」