When you compile, you can specify the classpath as the argument:
Code:
javac -classpath PathToYourClassesHere YourFileToCompile.java