JavaBeat Certifications Certifications Kits Articles Interview Questions OCAJP 7 OCPJP 5 OCPJP 6 OCEJWCD 6 SCBCD 5.0 SCEA SCJA

What jars do I need on the classpath to use XMLBeans?

Topic :
Feedback Request New QnA Print Email

  • The obvious one is xbean.jar, which contains the XMLBeans code. scomp.cmd includes trailing periods after this on v1.0.4, which may cause problems under Windows XP.

  • For XMLBeans V1, this is all you need, but for XMLBeans 2, the JSR173 API jar is also required, since it contains classes that XMLBeans depends on. For XMLBeans 2.0.0, the name of the jar is jsr173_api.jar and for XMLBeans 2.1.0, it's jsr173_1.0_api.jar. In both cases, the jar comes with the XMLBeans binary distribution (for source distributions, the build process will download it and place it in the build/lib directory.

  • For JDK 1.4 users, as of XMLBeans 2.3.0 it has become necessary to also include xmlbeans-qname.jar

  • If XPath/XQuery support is required, the xbean_xpath.jar contains the XPath "glue" code and needs to be included on the classpath. Then, depending on the version of XMLBeans in use, the following are also required: jaxen.jar for XMLBeans V1 (only supports XPath, no XQuery), saxon8.jar for XMLBeans V2.0.0 and V2.1.0 (the only version supported is Saxon 8.1.1), saxon8.jar and saxon8-dom.jar for XMLBeans built from SVN head (this supports Saxon >= 8.6.1).

  • In addition to those, compiling Schemas using the scomp script requires tools.jar from the JDK and resolver.jar from Apache xml-commons (the latter one only in case support for OASIS XML catalogs for resolving external entities is needed).

  • We make another jar available, xmlpublic.jar, which contains the classes in the "org.apache.xmlbeans" package. If your code can be compiled with xmlpublic.jar on the classpath instead of the full xbean.jar, it means that your code uses only "public", supported APIs and will likely not need any modification if you need to upgrade to a newer XMLBeans version.

Topic :
Feedback Request New QnA Print Email

All api java java 6.0 java 7.0 jdbc jsp servlet ejb jndi jms ejb 3.0 j2ee jee 5.0 jee 6.0 jsf struts spring Hibernate ajax JBoss Seam netbeans eclipse ant xml maven dojo junit javafx j2me log4j ESB JBoss Apache Quartz scjp mysql oracle gwt openjpa jmx yui google-guice android JBoss scwcd 5.0 scjp 1.5 scjp 1.6 scja scbcd 5.0

javabeat | advertise | about us | contact | useful resources
Copyright (2004 - 2013), JavaBeat