-
Notifications
You must be signed in to change notification settings - Fork 118
JDOM2 Dependencies and Supported Versions
JDOM2 depends on a number of third-party libraries and executables. This page documents these dependencies, and any support issues with these libraries.
Supported Java versions:
Summary: JDOM2 is supported on Java6 and later. JDOM2 will run on Java5 with some limitations.
JDOM2 will not run at all on Java 1.4 or older.
JDOM2 is tested fully with Java6 and Java7. All tests are expected to pass on these platforms (except 3 tests failing on Java6 because of a Jaxen issue). JDOM2 is tested in a limited way on Java5 with a few documented test failures.
If you experience a problem with JDOM2 please inform the mailing list. A more comprehensive statement about JDOM2 support of Java versions is:
- JDOM2 will support Java6 and newer.
- JDOM2 core functionality will run on Java5 with some limitations, documented issues, and workarounds.
- issues in JDOM2 will be addressed if they are reproduced in Java6 or later
- issues that affect Java5 only will also be considered, but with closer scrutiny. A fix will not be considered if it (negatively) impacts functionality in later Java versions.
The list of issues and workarounds with JDOM2 on Java5 will be maintained: JDOM and Java5
JDOM2 uses Jaxen 1.1.3. It has not been tested with any other versions. There is a known problem in Jaxen JAXEN-215 that affects JDOM when retrieving Attribute or Namespace nodes from an XPath expression, where the order of these values are not the same as the way they are returned from the native JDOM methods.
JDOM2 includes the jaxen 1.1.3 jar in the JDOM2 distribution. It is also included in the jdom2_dev_jars.zip archive on the downloads page.
JDOM2 cannot pass all of it's tests with the Xerces parser embedded in Java6 or Java7. It needs the external third-party Xerces jar. JDOM2 is currently using version 2.11.0, and includes it in the JDOM2 distribution. They are also included in the jdom2_dev_jars.zip archive on the downloads page.
Read the documentation for Xerces, but in short if you want to download your own copy, you download a zip file, you extract it, and then you put the xercesImpl.jar and the xml-apis.jar files from that zip in your classpath.
JDOM2 snapshots (and probably the final JDOM2 packages) are shipped with these two Jars in the 'lib' folder so you do not need to download them from elsewhere. These jars are also referenced as dependencies in any Maven files, so they should automatically be pulled in if you use maven.
The base Java6 and Java7 versions of the parsers successfully process almost all of the JDOM2 test harness. The following are the basic issues with the embedded Java parsers (the failing tests):
- You cannot completely suppress the expansion of external entitites from DTD's (SAXBuilder.setExpandEntities(false) does not work as expected);
- DOM parsing using XML Schema validation of XML Documents that use xmllink references appears to be broken, and the linked XSD documents are ignored.
JDOM2 is managed with Ant 1.8.2. Ant uses some features of Ant 1.8.2 which are not present in previous versions (specifically the junit 'batchtest/sort' mechanism). There may be other issues with previous versions of ant. Newer versions of Ant should work fine too.
The Ant libraries are included in the jdom2_dev_jars.zip archive on the downloads page.
JDOM2 has a comprehensive test suite in JUnit. All tests have been built and run with JUnit 4.8.2. There are newer versions available which should also work.
The JUnit libraries are included in the jdom2_dev_jars.zip archive on the downloads page.
JDOM2 uses Cobertura 1.9.4.1 to report on the code coverage of the Unit tests.
The Cobertura libraries are included in the jdom2_dev_jars.zip archive on the downloads page.
StAX consists of an API and an implementation of that API. Java6 and 7 include both. Java 5 contains neither. Woodstox is an open-source implementation of StAX that is based on an extended StAX2.0 (unofficial) API. Woodstox can be used with Java5 to provide StaAX support. Woodstox includes additional functionality beyond the core StAX API, so you may want to use Woodstox with Java6 and Java7 implementations anyway. JDOM2 does not require Woodstox.
JDOM2 works with either the Java built-in code, or Woodstox. If you use Java5 you need Woodstox. If you use a current Java then you can rely on the built-in code. JDOM2 is tested with the built-in Java6 code. Woodstox tends to use single quotes to enclose attribute values, and the JDOM test harness expectes double-quoted values, so many of the tests fail with Woodstox, but only for the quoting reasons.
The Woodstox libraries are included in the jdom2_dev_jars.zip archive on the downloads page.
[JDOM Home](http://www.jdom.org)
Stable Release
- [Download](http://www.jdom.org/downloads/index.html)
- [JavaDoc](http://www.jdom.org/docs/apidocs/index.html)
JDOM 2.x
- Overview
- Getting Started
- JDOM on Android
- [JavaDoc](http://hunterhacker.github.com/jdom/jdom2/apidocs/index.html)
- [Coverage](http://hunterhacker.github.com/jdom/jdom2/coverage/index.html)
- [UnitTests](http://hunterhacker.github.com/jdom/jdom2/junit.report/index.html)
- Features
- JDOM 1.x to JDOM 2.x
- Dependencies
Developing JDOM