File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes What is the concept of endorsed directory?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "What is the concept of endorsed directory??" Watch "What is the concept of endorsed directory??" New topic

What is the concept of endorsed directory??

Pankaj Poshirkar
Ranch Hand

Joined: Dec 31, 2009
Posts: 59
Dear All,

Can anyone let me know what is the concept of endorsed directory in java?
Suppose I have a class called Some.class which is present in two jar files named file1.jar and file2.jar.

Suppose I have this directory structure:


And suppose I have kept file1.jar in the 'lib' folder and file2.jar in lib\endorsed, which version of Some.class will get called? From file1.jar or from file2.jar?

Thanks in advance,
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

For a very few special packages -- the org.omg CORBA packages, for instance -- you can override the version that comes with your JRE by dropping the jars into an "endorsed" directory. These are packages that implement "endorsed standards" -- basically things that get shipped with the JDK but that are governed by some third-party standards body. Anyway, this only works for packages on this short list, and in general, most jars in such a directory are just going to be ignored.

[Jess in Action][AskingGoodQuestions]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
JAXB and JAX-WS are probably the packages most frequently updated in that way, and JAXP to a lesser degree.
I agree. Here's the link:
subject: What is the concept of endorsed directory??
It's not a secret anymore!