which .jar file has javax.xml.stream.*? which .jar file has javax.xml.stream.*? xml xml

which .jar file has javax.xml.stream.*?


StAX is not a part of Java 5; you'll find it in Java 6, however.For Java 5, you'll need to download a StAX implementation and place it in the classpath.

Woodstox is one such implementation. You could also use the Sun Java StAX XML processor, which has made its way into Java SE 6.

Unless I'm mistaken, both of these implementations will eventually use the jsr173_api.jar, where you'll find the javax.xml.stream package.

Update:

The Woodstox documentation would refer you to download the StAX 1.0.1 API jar (required when you use the standard StAX API); the StAX2 API jar in Woodstox will not contain the javax.xml.stream package (although you'll need both JARs at runtime). The Sun implementation depends on the stax-utils project.

Update 2

Installing JSXP

The download files area of SJSXP looks a bit weird, in that you have a class file, instead of build JARs. However, all that is needed to obtain the SJSXP JAR, is to execute the class file, which unpacks the distribution.

Getting the StAX API JAR

The StAX API jar (jsr173_api.jar or the like) can be obtained from the StAX utilities project. It needs to be in the same directory as the sjsxp jar.

Using the JARs in Eclipse

It is not necessary to add the JARs to lib/ext of the JDK. It is enough to add the two JARs to the Build Path of the project.


Can I point you to findjar.com, which allows you to enter a classname and determine which jar is required.

e.g. XMLInputFactory yields

jsr173_1.0_api.jarjsr173_api.jarstax-api-1.0.1.jarstax-api-1.0.1.jarstax-api-1.0.jargroovysoap-all-jsr06-0.1.jar