Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Penalty for overdoing CLASSPATH?

Status
Not open for further replies.

GDameron

Programmer
Aug 8, 2003
39
US
Is there a runtime penalty for putting more jars in the CLASSPATH than the application actually requires? What exactly does the JRE do with all the jars in CLASSPATH? Does it unjar everything at the start? Or does it only start looking through the jars for a particular class when a call to one of its methods is made by the application?

GD
 
It will only look there for classes not already loaded.
It might increase the searching time a little at start.

Another penalty is, that you will loose the overview of the dependencies of applications.
Make start-scripts with individual CLASSPATHs for your applications, or better: specify the classpath in the jar-file.
Put often and commonly used jars in $JAVA_HOME/jre/lib/ext.


seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top