Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of jre\lib\ext directory

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read somewhere that I can dispense with a huge
CLASSPATH environment variable by plonking all my
required jar files in jre\lib\ext and the runtime will
automatically look for packages there.
I've done that but it doesn't seem to pick it up.
Can someone help me understand the relevance of
jre\lib\ext and how to make it work ? Thanks.
Pho
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a description of all of the directories: http://java.sun.com/products//jdk/1.2/docs/tooldocs/solaris/jdkfiles.html
Your CLASSPATH would need to include the /JRE/LIB/EXT directory to pick this up. It sounds like they were just suggesting blending your stuff with any extention jars that you are using.
 
Mark Savory
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pho,
It's interesting that it doesn't work for you because it works for me - and I'm not adding jre/lib/ext to my classpath.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK Mark, Now you made me go out and learn something .
This is some reading on extension libraries: http://java.sun.com/j2se/1.3/docs/guide/extensions/spec.html
and it says that one of the properties of System is the java.ext.dirs property and that it defaults to < java-home>\lib\ext [Win32] or < java-home>/lib/ext [Solaris].
So I guess that you DO NOT need to put it in your classpath. However if you put extensions anywhere but the default, then you need to modify this property.
[This message has been edited by Cindy Glass (edited March 26, 2001).]
 
Mark Savory
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rats! Now I learned something too.
 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to check whether my JAVA_HOME env var is set
correctly. And try again.
Thanks to all.
Pho
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also bear in mind that it can be easy to get confused if you have more than one JRE or SDK installed. In particular, on Windows Systems there is usually a JRE in "Program Files" as well as one in wherever you installed your Java 2 SDk. Make sure that your jars are in the right one (or both if you are very cautious).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic