Link to home
Start Free TrialLog in
Avatar of sunnystar
sunnystarFlag for Afghanistan

asked on

How do I set java endorsed standards mechanism in Netbeans 6 with Windows Vista?

I have a project using Netbeans 6.5 using web services. Build is happening with Windows Vista, on a project that had previously successfully built in Netbeans 6.1.

So on compile I get the following error message.

wsimport-client-check-WebService4ProjectServer:
wsimport-client-WebService4ProjectServer:
D:\swProjects\Back2You\Back2YouDemo\nbproject\jaxws-build.xml:24: You are running on JDK6 which comes with JAX-WS 2.0 API, but this tool requires JAX-WS 2.1 API. Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <wsimport>.

I have tried to implement the setting of java.endorsed.dirs in the project compile options as follows

-Djava.endorsed.dirs="C:/Program Files/NetBeans 6.5/java2/modules/ext/jaxws21/api/"

but this doesn't change the error message.

How do I fix this please
Avatar of Mick Barry
Mick Barry
Flag of Australia image

try this:

java -jar <2.1 api path>/jaxb-xjc.jar my.xsd
Avatar of sunnystar

ASKER

Just to clarify, I'm trying to compile code, so will be using javac (but via netbeans).

http://java.sun.com/javase/6/docs/technotes/guides/standards/ states the java.endorsed.dirs property should be used to indicate the upgraded directory is present...but the error messsage remains the same.
your problem does not appear to be during compilation.

> Just to clarify, I'm trying to compile code, so will be using javac (but via netbeans).

that error is not from javac

> I have tried to implement the setting of java.endorsed.dirs in the project compile options as follows

that won't help because its not javac thats failing, its xjc
you ould need to be passing it to the ant task thats perforing the work

Theres some details on the xjc ant task here, which should work for you.
https://jaxb.dev.java.net/nonav/2.1.2/docs/xjcTask.html


ASKER CERTIFIED SOLUTION
Avatar of sunnystar
sunnystar
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial