• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

How to use third party implementions of java apis

 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

Could any one help me out with how to do this?

I have a particular question and a general one.

1. How do I use the woodstox implementation of the StAX API with jse 1.6 in place of the bundled implementation (sjsxp) in the the jdk?

2. In general how does one use third party implementations instead of the bundled implementations in the jdk?

Any help is greatly appreciated. Thanks.

Gamini
 
Ranch Hand
Posts: 162
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you add 3rd party jars in your classpath then you can use it your code
it is applied to all 3rd party api

Thanks
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, if we take the specific question here and suppose I put the woodstox jars in the classpath, will the JVM pick the woodstox implementation (i.e. give priority to what's in the classpath)instead of it's bundled implementation (sjsxp)?

It seems unlikely to me. I am expecting some form of pluggability configuration here? Anybody else can help?
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JEE 5 tutorial talks about that. It uses properties, similar to how one would select a particular SAX or DOM implementation. The one you're looking for is probably javax.xml.stream.XMLInputFactory.
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
Thanks for getting me to the right track.
Going through the link your provided. For future references the following link is also helpful (on JAXP implementations)

https://jaxp.dev.java.net/1.4/JAXP-FAQ.html
(search for the section "Q. How do I use a different JAXP compatible implementation?" )
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!