For a jython script for wsadmin... I am doing
CLASSPATH = "/path/jar1.jar" + "\n" + "/path/jar2.jar"
But its not working, it setting as /path/jar1.jar/path/jar2.jar
Where am I going wrong.
For a jython script for wsadmin... I am doing
CLASSPATH = "/path/jar1.jar" + "\n" + "/path/jar2.jar"
But its not working, it setting as /path/jar1.jar/path/jar2.jar
Where am I going wrong.
You should use path separator (os.pathsep
) instead of newline:
>>> import os
>>> os.pathsep.join(["/path/jar1.jar", "/path/jar2.jar"])
'/path/jar1.jar:/path/jar2.jar'
Working:
Whilst the WAS admin console (the web page) requires you to enter the classpath with newlines, the wsadmin tool requires that it be separated by the host O/S file separator. So there is no need to modify the input string at all.
classpath = "a.jar;b.jar;c.jar"
Will work just fine.
Source: How to get newlines in classpath for JMSProvider using wsadmin