• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I add a whole directory of .jars to the classpath?  RSS feed

 
Grey Lisztjowicz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I add a whole directory full of .jar files to the classpath?

We're trying to use a whole series of existing .jars and don't want to add and delete parts of the classpath during troubleshooting. We just want to tell our (cmd-ln) program to look in one directory and use whatever .jars it finds.

Thanks,
Grey
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could write a little script that adds all jar files in a particular directory to the classpath, and then starts the programs. Here's a little snippet from the fop.sh script of Apache FOP that does this:
 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi grey

Apache ant will solve your problem

try that also

regards
amir
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!