File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes error when building in ecllipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "error when building in ecllipse" Watch "error when building in ecllipse" New topic

error when building in ecllipse

prav ba

Joined: Jun 17, 2007
Posts: 12
hi all,
am using ant to build a project and i keep getting this error:

D:\eclipse3.3.1\workspace\online-bill\build.xml:734: java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/D:/eclipse3.3.1/workspace/online-bill/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See

i dont know much about 'endorsed directory mechanism ' so not sure what to do. any help would be much appreciated.

thanks in advance.
Steve Luke

Joined: Jan 28, 2003
Posts: 4181

There isn't a whole lot to say that the link you posted doesn't say.

1) The Endorsed Standards Override is a mechanism to provide newer releases of certain endorsed libraries than those provided by the JRE

2) Any library you are trying to employ using the Endorsed Standards Override must be in a JAR and must be in a directory defined as a source directory for endorsed libraries

3) You can use the java.endorsed.dirs property to define what directories contain endorsed JAR libraries
- java.endorsed.dirs would be an environmental property or could be set using java -Djava.endorsed.dirs="..." ...

4) The default directory is <Java Home>/lib/endorsed

So if you have a JAXB 2.1 JAR, and you don't want to set the java.endorsed.dirs property, copy the JAR file to <Java Home>/lib/endorsed/ which would cause your run time to use the newer version of JAXB rather than the version included with the JRE.

Note, though, that you should double check your Eclipse run time to make sure it does not override the endorsed directory in some way.

I agree. Here's the link:
subject: error when building in ecllipse
It's not a secret anymore!