博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
JDK和JAXB的对应
阅读量:7234 次
发布时间:2019-06-29

本文共 1468 字,大约阅读时间需要 4 分钟。

This table captures the history of the JAXB RI integration into JDK.

This is for information purposes only. In particular, the JAXB RI in JDK is

package renamed to avoid any conflict with the stand-alone JAXB RI  distribution

or with the jaxb2- reflection library.  You can use any version of these with any version of

JDK without worrying about implementation conflicts.
JDK6 first release - JDK6 u3    JAXB RI 2.0.3
JDK6 u4                                 JAXB RI 2.1.3
JDK6 u14                                JAXB RI 2.1.10
JDK7 first release                    JAXB RI 2.2.4-1
比如com.sun.xml.internal.bind.v2.ContextFactory就是
com.sun.xml.bind.v2.ContextFactory package renamed.

那么他们的加载顺序是什么样的呢?

The algorithm used to locate the provider subclass to use consists of the following steps:

  •   If the $java.home/lib /jaxb.properties file exists and it is readable by   the java.util.Properties.load(InputStream) method and it contains   an entry whose key is javax.xml.bind.context.factory then the value of   that entry is used as the name of the implementation class.

  •   If a system property with the name javax.xml.bind.context.factory   is defined, then its value is used as the name of the implementation class.

  •   If a resource with the name of   META-INF/services/javax.xml.bind.context.factory   exists, then its first line, if present, is used as the UTF-8 encoded   name of the implementation class.

  •   Finally, a default implementation class name is used.

后来发现JWS-RI的加载顺序与这个1,3倒过来了,我没有去确认。链接给大家:

http://docs.oracle.com/javaee/5/api/javax/xml/ws/spi/Provider.html,需要的自已确认吧。

转载地址:http://qiofm.baihongyu.com/

你可能感兴趣的文章
Java 开发者最容易犯的10个错误
查看>>
Web 探索之旅 | 第三部分第一课:服务器
查看>>
0110 - 给 iPhone 6 换了电池
查看>>
从国企到阿里的面试经历(二)
查看>>
[译] 利用 Python 中的 Bokeh 实现数据可视化,第一部分:入门
查看>>
Vue教程14:配置子路由
查看>>
手牵手教你写 Vue 插件
查看>>
从零开始写项目第三篇【登陆注册模块】
查看>>
Hibernate的HQL语句参数异常IllegalArgumentException
查看>>
由《寻秦记》说代理模式(静态,动态,CGLib)
查看>>
04、Python 系列之 python 的基础知识
查看>>
猫客页面内组件的动态化方案-Tangram
查看>>
CTF中比较好玩的stego
查看>>
一起撸个朋友圈吧(step5) 控件篇(评论popup上)
查看>>
CAS源码分析
查看>>
uni-app 1.4 发布,一套代码,发行小程序(微信/支付宝/百度)、H5、App多个平台...
查看>>
移动端 IP 优选方案
查看>>
聊聊flink TaskManager的managed memory
查看>>
聊聊resilience4j的CircuitBreaker
查看>>
【广州-互联网-Node.js招聘】
查看>>