wood burning stoves 2.0*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
Author

What is the concept of endorsed directory??

Pankaj Poshirkar
Ranch Hand

Joined: Dec 31, 2009
Posts: 53
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:

lib\
lib\endorsed

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,
Pankaj
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
JAXB and JAX-WS are probably the packages most frequently updated in that way, and JAXP to a lesser degree.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the concept of endorsed directory??