Reputation: 2148
I new to Python and am looking for a way to create my CLASSPATH
argument for Jython script in wsadmin for Websphere, by reading from a folder and including all jars in that folder.
Example :
/jar_dir
1.jar
2.jar
...
70.jar
CLASSPATH= INSTALL_PATH + "/jar_dir/1.jar;" + INSTALL_PATH + "/jar_dir/2.jar;" .... INSTALL_PATH + "/jar_dir/70.jar;"
How can I do this?
Upvotes: 0
Views: 254
Reputation: 126
The correct way to do this would be: [1] Adding the jars to "com.ibm.ws.scripting.classpath" to your wsadmin.properties file. See This.
[2] Or add the switch "-wsadmin_classpath /path/to/jar" when you call wsadmin.
Upvotes: 1
Reputation: 11235
what I would do
import glob
...
";".join(glob.glob(INSTALL_PATH+"/jar_dir/*.jar"))
Upvotes: 1