• Post Reply Bookmark Topic Watch Topic
  • New Topic

Classpaths and Jar files.  RSS feed

 
Thomas Young
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a directory is provided in the classpath, and that directory contains jar files, do the jar files get included? or must you additionally specify each jar file in the classpath?

Regards,
TY.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java 6 (and no previous version), you can use classpath wildcards -- i.e. entries like "/path/to/jardirectory/*". Otherwise, including a directory in which jars exist does nothing -- the jars are not automatically included.
 
Thomas Young
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ernest,
Thanks for the clarification, especially in highlighting the Java 6 difference.

Regards,
TY.
 
ashok ballu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your quote:
---------------------------------------------------------------------------
"If a directory is provided in the classpath, and that directory contains jar files, do the jar files get included? or must you additionally specify each jar file in the classpath?"
--------------------------------------------------------------------------
According to my experience,If we include a directory/Folder to classpath , then all the jar files will be searched. No need to maintion each and every jar file explicitly
[ November 04, 2008: Message edited by: ashok ballu ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!