Include multiple jars with classpathentry
classpath, eclipse, jar, java
Solution
I'm not sure eclipse can do that itself.
You could try
- Move to Maven for you build system and then it's eclipse:eclipse command will generate the .classpath file for you
- Get ant to modify the .classpath after a build. After all, it's just xml
Problem
I have an eclipse's .classpath file that looks like this: ``` <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="test"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> <classpathentry kind="lib" path="/libraries/jee/servlet-api.jar"/> <classpathentry kind="lib" path="/libraries/junit/junit-4.6.jar"/> <classpathentry kind="lib" path="/libraries/log4j/log4j-1.2.15.jar"/> </classpath> ``` I'd like to add a whole directory of jars to the classpath - I like eclipse (or more precisely, our ant-based build process that uses .classpath format) to know several jars that reside in a single directory, without specifying them directly. How can I do that?