开发者

insanely long classpath

I am trying to add the following classpath nicely to windows, but I don't know how. All this files are in the same folder, but it just doesn't work if I set my classpath variable to .;C:\Program Files (x86)\GATE-6.0\lib*.jar.

This one doesn't work either:

.;C:\Program Files (x86)\GATE-6.0\lib\Bib2HTML.jar;C:\Program Files (x86)\GATE-6.0\lib\GnuGetOpt.jar;C:\Program Files (x86)\GATE-6.0\开发者_如何学编程lib\activation.jar;C:\Program Files (x86)\GATE-6.0\lib\ant-contrib-1.0b2.jar;C:\Program Files (x86)\GATE-6.0\lib\ant-junit.jar;C:\Program Files (x86)\GATE-6.0\lib\ant-launcher.jar;C:\Program Files (x86)\GATE-6.0\lib\ant-nodeps.jar;C:\Program Files (x86)\GATE-6.0\lib\ant.jar;C:\Program Files (x86)\GATE-6.0\lib\bcmail-jdk15-1.45.jar;C:\Program Files (x86)\GATE-6.0\lib\bcprov-jdk15-1.45.jar;C:\Program Files (x86)\GATE-6.0\lib\commons-compress-1.0.jar;C:\Program Files (x86)\GATE-6.0\lib\commons-discovery-0.2.jar;C:\Program Files (x86)\GATE-6.0\lib\commons-fileupload-1.0.jar;C:\Program Files (x86)\GATE-6.0\lib\commons-io-1.4.jar;C:\Program Files (x86)\GATE-6.0\lib\commons-lang-2.4.jar;C:\Program Files (x86)\GATE-6.0\lib\commons-logging-1.1.1.jar;C:\Program Files (x86)\GATE-6.0\lib\concurrent.jar;C:\Program Files (x86)\GATE-6.0\lib\dom4j-1.6.1.jar;C:\Program Files (x86)\GATE-6.0\lib\fontbox-1.1.0.jar;C:\Program Files (x86)\GATE-6.0\lib\gate-asm.jar;C:\Program Files (x86)\GATE-6.0\lib\gate-compiler-jdt.jar;C:\Program Files (x86)\GATE-6.0\lib\gateHmm.jar;C:\Program Files (x86)\GATE-6.0\lib\geronimo-ws-metadata_2.0_spec-1.1.1.jar;C:\Program Files (x86)\GATE-6.0\lib\icu4j.jar;C:\Program Files (x86)\GATE-6.0\lib\jakarta-oro-2.0.5.jar;C:\Program Files (x86)\GATE-6.0\lib\javacc.jar;C:\Program Files (x86)\GATE-6.0\lib\jaxb-api-2.0.jar;C:\Program Files (x86)\GATE-6.0\lib\jaxen-1.1.jar;C:\Program Files (x86)\GATE-6.0\lib\jaxws-api-2.0.jar;C:\Program Files (x86)\GATE-6.0\lib\jdom.jar;C:\Program Files (x86)\GATE-6.0\lib\jempbox-1.1.0.jar;C:\Program Files (x86)\GATE-6.0\lib\junit.jar;C:\Program Files (x86)\GATE-6.0\lib\log4j-1.2.14.jar;C:\Program Files (x86)\GATE-6.0\lib\lubm.jar;C:\Program Files (x86)\GATE-6.0\lib\lucene-core-3.0.1.jar;C:\Program Files (x86)\GATE-6.0\lib\mail.jar;C:\Program Files (x86)\GATE-6.0\lib\nekohtml-1.9.14.jar;C:\Program Files (x86)\GATE-6.0\lib\ontotext.jar;C:\Program Files (x86)\GATE-6.0\lib\pdfbox-1.1.0.jar;C:\Program Files (x86)\GATE-6.0\lib\pg73jdbc3.jar;C:\Program Files (x86)\GATE-6.0\lib\poi-3.6.jar;C:\Program Files (x86)\GATE-6.0\lib\poi-ooxml-3.6.jar;C:\Program Files (x86)\GATE-6.0\lib\poi-ooxml-schemas-3.6.jar;C:\Program Files (x86)\GATE-6.0\lib\poi-scratchpad-3.6.jar;C:\Program Files (x86)\GATE-6.0\lib\spring-aop-2.0.8.jar;C:\Program Files (x86)\GATE-6.0\lib\spring-beans-2.0.8.jar;C:\Program Files (x86)\GATE-6.0\lib\spring-core-2.0.8.jar;C:\Program Files (x86)\GATE-6.0\lib\stax-api-1.0.1.jar;C:\Program Files (x86)\GATE-6.0\lib\tika-core-0.7.jar;C:\Program Files (x86)\GATE-6.0\lib\tika-parsers-0.7.jar;C:\Program Files (x86)\GATE-6.0\lib\wstx-lgpl-3.2.3.jar;C:\Program Files (x86)\GATE-6.0\lib\xercesImpl.jar;C:\Program Files (x86)\GATE-6.0\lib\xmlbeans-2.3.0.jar;C:\Program Files (x86)\GATE-6.0\lib\xmlunit-1.2.jar;C:\Program Files (x86)\GATE-6.0\lib\xpp3-1.1.3.3_min.jar;C:\Program Files (x86)\GATE-6.0\lib\xstream-1.2.jar

How do I add all these jars to the classpath

Ted


Make sure you use quotes when you have spaces in a file name for the command line, like

"C:/Program Files/..."

else C:/Program will be interpreted as a separate arguments from Files/...


Can you try putting some other jar and using it in Java program from location where you are trying to run the app/program which will use all this libraries. I think this will digonose the problem that is this class path variable is used by jdk or not.


I think you just need to say C:\Program Files (x86)\GATE-6.0\lib\* (appropriately quoted of course.)

Refer to "Setting the class path" for details. Specifically read the section entitled "Understanding class path wildcards".


If your classpath is insanely long you might consider writing your own classloader to dynamically load jars or .class files. It's actually not that hard to do and could simplify things.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜