I cannot figure out how to add jar files the the classpath in Java. Can anyone help?
if you wished to add ant.jar which is in the directory
c:\ant\lib\ant.jar to the classpath,
from a dos shell type
c:> set classpath=%classpath%;c:\ant\lib\ant.jar
Alternatively you can set it in your environment variables. this will save you having to set the classpath everytime you open a dos shell. Environment variables are set through the control panel -> system
Another way to add to your classpath is through the java command line.
e.g. jar to add: c:\blah\blah.jar
java -classpath %classpath%;c:\blah\blah.jar ClassToExecute
In UNIX environments, replace %classpath% with $CLASSPATH, ';' with ':' and '\' with '/'.