JAX-WS RI on Java 5

2019-06-25 11:59发布

问题:

First of all, according to the documentation, the JAX-WS reference implementation is supposed to work with Java 5.

The binary package with the latest version (2.2.7) is however compiled with Java 6 (class version 50.0), so using it with Java 5 will cause an UnsupportedClassVersionError to be thrown. I've downloaded the Java sources and tried to compile them with Java 5, but since dependent libraries are compiled for Java 6, this does not work directly either. I've tried to compile a new version with Java 6 using "-target 1.5" to at least get the correct class version in the compiled files, but I am not sure if I run into other problems, if the implementation at some point actually expects Java 6 or newer.

Does anybody know the latest JAX-WS RI version, which is known to work with Java 5 without similar workarounds?


Edit:

To answer at least one part of my question, the JAX-WS RI implementation makes use of new functionality in the Java 6 SE API and will not run on Java 5, even if the classes are compiled for target 1.5. At least the class org.jvnet.ws.message.BasePropertySet makes use of the class java.util.AbstractMap$SimpleImmutableEntry, which is only available since Java 1.6.

回答1:

From my experience, JAX-WS RI version 2.2.5 is last one working with Java 5.