https://jaxb.dev.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html
7.1.2. Using JAXB 2.1 with JavaSE 6
JavaSE 6 comes with JAXB 2.0 API in rt.jar. Therefore, using JAXB 2.1 with JavaSE 6 requires one to override a portion of rt.jar with the new API. There are several ways to do this:
1. Place the 2.1 jaxb-api.jar into $JRE_HOME/lib/endorsed. This essentially makes your JRE to "JRE 6 + JAXB 2.1". This won't affect any other applications that use this JRE, and it's easy. On the other hand, in various scenarios you may not be able to alter the JRE.
2. Use the system property java.endorsed.dirs when you launch your application, and have it point to the directory that contains the 2.1 jaxb-api.jar. This allows you use use JAXB 2.1 without modifying the JRE. Make sure not to include any other JAXB RI jar files (such as jsr173-api.jar or jaxb-impl.jar.)
3. Implement a custom ClassLoader and block delegation to javax.xml.bind package, so that code running inside this class loader will load the JAXB API from elsewhere. This is a very advanced approach.
No matter which approach you take, make sure not to include jar files other than jaxb-api.jar. Doing so, for example including jaxb-xjc.jar, may result in classloading related errors such as "taskdef A class needed by class com.sun.tools.xjc.XJCTask cannot be found: org/apache/tools/ant/...."
See the endorsed directory mechanism for more details.
分享到:
相关推荐
这个是jaxb2.1 jar包,这里提供下载,只要2个资源分哦,大家可以踊跃下载
jaxb-impl-2.1.jar
JPA-XJC是一个JAXB 2.1 XJC插件,用于使用Java持久性注释对模式派生类进行注释。 它不会根据JPA 1.0以外的库生成代码,并且不会引入非标准的自定义元素。
jaxws-api-2.1.jar jaxb-api-2.1.jar geronimo-jaxws_2.2_spec-1.1.jar 在webservice中常用的几个jar包,
NULL 博文链接:https://201208252245.iteye.com/blog/2036875
目录下可以解决JAXB 2.0 API is being loaded from the bootstrap classloader错误. 注意:java web 项目必须在一个发布后的可以正常启动的web项目里打印。和java项目打印出的目录是不一样的。
jaxb-api-2.1.jar 和 jaxb-impl-2.1.8.jar
jaxb-impl-2.1.jar包很有作用的,希望你们能喜欢
自己使用过,jaxb-api的jar包 亲测可用,请放心下载!
在使用webservice,mule esb等需要jaxb的项目里经常会出现 JAXB 2.0 API is being loaded from the ...我把jaxb-api-2.1.jar放到E:/tomcat6/common/endorsed下后问题解决。 注:没有common/endorsed目录的,自己创建。
JAXB的使用JAXB的使用JAXB的使用JAXB的使用
Installation Download the binary and execute this jar as java -jar JAXB2_20060607.jar On Windows, you can just double-...This is ideal for associating source code zips with JAXB RI jars in your IDE.
无需安装,解压后即可。jaxb-api.jar,jaxb-xjc.jar,jaxb-impl.jar,activation.jar等相关jar包在lib文件夹下。
jaxb jars, version 2.1, 足够现在用了, 下载完然后在dos 命令下用命令'java 下载目录/AXB2_20100510.jar', 会自动解压,里面有个lib目录,里面有*.src.zip, *.jar,*.jar是我们需要的。 用这个命令前确保JAVA_HOME...
离线安装包,亲测可用