开发者

Java Classpath at Runtime

I am importing import org.apache.commons.httpclient.*; in a program, but whenever I go to run it, I have to include the JAR in the classpath. Why is this necessary? Are there开发者_Go百科 any ways around this?


I suspect that it's as simple as Tomcat, by virtue of being a web server, links libraries that it (it == the java people) think that people making servlets will need and want but that would be superfluous for normal standalone java apps. Maybe one day it'll become a part of the JRE itself?

It might also be included in Tomcat's lib/ folder by default - I'm not sure.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜