August 2004
Intermediate to advanced
480 pages
9h 41m
English
You can set the classpath at compile time. This is useful if you have a quick class you want to try out, and it relies on a library or other class that is not currently on your classpath. You do so using the -cp flag. You can also use -classpath if you are exceptionally fond of typing.
Try it like this:
javac -cp C:\\garage\classes SomeClass.java
Note that you can combine flags as well:
javac -source 1.5 -cp
/user/eben/garage/SomeClass.java
Read now
Unlock full access