File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to use third party implementions of java apis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to use third party implementions of java apis" Watch "How to use third party implementions of java apis" New topic
Author

How to use third party implementions of java apis

Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
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
Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

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

Joined: Aug 05, 2008
Posts: 347
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?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
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.


Ping & DNS - my free Android networking tools app
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
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?" )
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use third party implementions of java apis