super

DocumentBuilderFactory.newInstance()查找DocumentBuilderFactory实现类的过程

1.在系统环境变量中(System.getProperties())中查找key=javax.xml.parsers.DocumentBuilderFactory
2.如果1没有找到,则找java.home\lib\jaxp.properties 文件,如果文件存在,在文件中查找key=javax.xml.parsers.DocumentBuilderFactory
3.如果2没有找到,则在classpath中的所有的jar包中查找META-INF/services/javax.xml.parsers.DocumentBuilderFactory 文件
    全都没找到,则返回null

posted on 2009-01-06 13:23 王卫华 阅读(1791) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: