开发者

Java Classpath at Runtime

开发者 https://www.devze.com 2023-01-18 13:05 出处:网络
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 aro

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

精彩评论

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

关注公众号