Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the concept of endorsed directory??  RSS feed

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author and iconoclast
Sheriff
Posts: 24218
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAXB and JAX-WS are probably the packages most frequently updated in that way, and JAXP to a lesser degree.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!