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

Posted on 2009-02-08
Last Modified: 2013-12-14
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.

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 (, 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
Question by:sunnystar
    LVL 92

    Expert Comment

    try this:

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

    Author Comment

    Just to clarify, I'm trying to compile code, so will be using javac (but via netbeans). states the java.endorsed.dirs property should be used to indicate the upgraded directory is present...but the error messsage remains the same.
    LVL 92

    Expert Comment

    your problem does not appear to be during compilation.

    LVL 92

    Expert Comment

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

    that error is not from javac

    LVL 92

    Expert Comment

    > 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.


    Accepted Solution

    It looks like it failed because Netbeans 6.5 was checking the target servers installed locally for the build had endorsed directories set with the JAX-WS api's. So the local copy of Tomcat 6 that was being built too to match the target server did not have this, hence the failure. At least this has pointed to a workaround - set to Sun Application Server 9 for the initial tasks and then back to Tomcat for the final build.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now