Suppose that you have the following folder structure:
lib/
a.jar
b.jar
classes/
com/
foo/
Bar.class
Baz.class
And you need to link with all of these things to compile some code. Then you would specify as your classpath:
-cp lib/a.jar:lib/b.jar:classes