views:

55

answers:

3

Hi,

I have a question and wonder if there is anyone came across the same situation as I did.

I upgrade java version from 1.4 to 1.6,

the java6 includes soap package itself, which means the axis soap libs i used previously will not be invoked. for example, javax.xml.soap.SOAPMessage.

Is there anyway that I can explicitly force the application to use old soap function, not the one included in java6, because it's not working for me...

Thanks!

+2  A: 

You can use the endorsed mechanism. In short, you put the libs you want to override the standard libs in a directory, tell Java where it is, and these librairies are loaded before the core ones.

Valentin Rocher
A: 

You can start the JVM with the -Xbootclasspath/p option, and prepend your Jars. However, you should first read about if the version of axis you are using is intended to work with 1.6 and what the recommended configuration is, since this solution may break other things if there is a real incompatability.

Yishai
+2  A: 

The endorsed mechanism mentioned by Bishiboosh is (unfortunately) the way to go. However, it is possible to write a ClassLoader that overrides its parent. Many Java EE servers do this.

Hopefully JDK7 will have a module implementation which means that endorsed is unnecessary.

Tom Hawtin - tackline