Using JarClassLoader


We have a Java Service which is a wrapper to a class which is packaged as a jar(say Jar1) and deployed in webMethods. One of this class inside the jar(Jar1), loads another jar(Jar2) file using the JarClassLoader. This Jar2 has depencies with few more jars. With the current setting, the wM is not capable of loading these dependent jars. The options that we have tried so far are

  1. Specifying the dependent Jar Files for the Jar2 in the manifest file using the “Class-Path” keyword.
  2. We also tried placing the dependent jar files in the /code/jars/static (Tried with reloading the package as well as restarting the IS)

Any suggestions on getting this working?

Sriram Kumar

Hi Sriram

Placing your jar files in IntegrationServer/lib/jars does not solve the problem?

Or specifying the JAR files in the PREPENDCLASSES (server.bat/sh)


Hi Mourao,

Thanks and appreciate the immediate response. The first option doesnt seem to work. The second option of pre-pending the classpath works. We were trying to avoid editing the server.bat/sh file and the imminent restart that is required. Would there be any other option available?

Sriram Kumar

Hi Sriram

And if you put all the jars ( the ones that you need and that you jars depend) in the folder

FONT=Arial/code/jars [/font]
The files are added in whatever order the File.list() method returns them.

If they are added in a wrong sequence, I don’t know how to see or change that.