Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Endorsed Standard Mechnaism in jdk 1.4.2  RSS feed

Ketan Khairnar
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I have been moving code written in jdk 1.2 to jdk 1.4
Most of the part is done but we used xerces 1.4.4 then and now as we have moved codebase to jdk 1.4.2.

Jdk1.4.2 has xalan and crimson as part of rt.jar
I want to use xerces (either 1.4.4 or latest 2.7.1) as both can be worked upon jdk 1.4.2

is it mandatory to use xerces 2? (as xerces 1.4 still works with jdk 1.4.2 I guess)
This is being important as

1. We are planning to be jaxp compliant in next stage
2. How can I achieve endorsed standard mechanism here

I guess there is no preexisting endorsed dir as said on xerces faq on
any body who had done please guide me in this concept

As of now I am able to get
java org.apache.xalan.Version properly because it is part of rt.jar itself
but when I fire this(


java org.apache.xerces.impl.Version

) on command line i get following error
Exception in thread "main"


java.lang.NoClassDefFoundError: org/apache/xerces

I tried this after putting xml-apis.jar and xercesImpll.jar in j2sdk1.4.2/lib/endorsed
This "endorsed" folder is created by me.
Please help me in this regard
Ernest Friedman-Hill
author and iconoclast
Posts: 24217
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't add new things to the JDK using the endorsed standards mechanism; you can only replace (some) existing things.

You could either put the xerces jars directly into jre/lib, as if they were standard extensions, or (more correctly) simply include them on your software's class path when you run it.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!