java - How do I add a folder full of Jar files to my classpath in Eclipse? -
I also want to get it repeatedly to many folders and capture all the jar files.
You can not actually do it through IDE, but what you can do is IDE And can manually write a program to modify. Add the .classpath file and jar.
For example, for your Eclipse project. The slashpath file looks like this:
& lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Classpath & gt; & Lt; Classpathentry kind = "src" path = "src / java / main" / & gt; & Lt; Classpathentry kind = "src" path = "src / java / tests" / & gt; & Lt; Classpathentry kind = "con" path = "org.eclipse.jdt.launching.JRE_CONTAINER / org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType / jre1.5.0_17" /> & Lt; Classpathentry kind = "lib" path = "test_reflib / commons-codec-1.3.jar" /> & Lt; Classpathentry kind = "lib" path = "test_reflib / commons-collection-3.2.1.jar" /> & Lt; Classpathentry kind = "lib" path = "test_reflib / commons-fileupload-1.1.1.jar" /> & Lt; / Classpath & gt; So what you can do is write a program that scans the directory that you pass it on, and manually modify it. Classpath file to contain jar. I never go in the trouble of doing this and generally keep all the jars in a folder and I am including them in the project. Or, if I want something like a jar, then I should just include those people who want me.
Comments
Post a Comment