views:

27

answers:

1

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 any ways around this?

+1  A: 

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.

rascher