Thursday, February 4, 2016

Java Endorsed

What is the concept of endorsed directory??
To put it in simple words , Suppose I have a class called Some.class which is present in two jar files named file1.jar and file2.jar.

Suppose I have following  directory & file structure:
  • lib\file1.jar
  • lib\endorsed\file2.jar

Then Some.class will be called from file2.jar get called.

More Details at
Way to do it in pom.xml


Why do i need it ?
 it is a mechanism to provide newer versions of an endorsed standard than those included in the Java 2 Platform.
Which means, a user can provide newer versions of certain packages than those provided by the JDK. If there are newer implementations of these packages in the directories specified by java.endorsed.dirs, those implementations will be loaded instead of the default ones that come with the JDK.

Roughly speaking the Endorsed Standards APIs include:
  • javax.rmi.CORBA
  • various org.omg.* packages
  • org.w3c.dom
  • various org.xml.sax.* packages

No comments: