I want to upgrade my jaxws to 2.2 (jdk1.6 comes bundled with jaxws 2.1). My jdk is (I did not install public jre):
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode)
In jaxws' own doc they explain how to do it:
One way to fix this is to copy jaxws-api.jar and jaxb-api.jar into JRE endorsed directory, which is $JAVA_HOME/lib/endorsed (or $JDK_HOME/jre/lib/endorsed)
But I am not sure this is having any effect in my installation. For starters I have only defined %JAVA_HOME%
. And folder $JAVA_HOME/lib/endorsed
is inexistant, so I created and copied the two jars. But if I do (wsgen is a tool from jaxws)
wsgen -version
I still get:
JAX-WS RI 2.1.6 in JDK 6
I also tried creating folder JAVA_HOME\jre\lib\endorsed
(notice that in the doc they say JDK_HOME, but as I only have JAVA_HOME I used this path). Still same wsgen output.
My questions are:
I found this post that has some hints about what I am seeing I think
You should check you system property java.endorsed.dirs
, e.g. by calling System.getProperty("java.endorsed.dirs")
. On a Windows machine, this is usually something like C:\Program Files\Java\jdk1.6.0_16\jre\lib\endorsed
. Put the jar files you want to endorse here. If that directory does not exist just create it.
Another option is to put the jars in a directory of your own preference, but override the system property by adding a command line switch -Djava.endorsed.dirs=<Your endorsed jars directory>
.