I read the Sun documentation and a lot of posts on Stack Overflow, but I\'m still confused about the differences between the Java compiler options -cp and
However, if sourcepath is NOT specified, the classpath is searched for both class files AND source files.
This leads me to believe that we can almost always keep things simple by using just classpath, and by avoiding sourcepath altogether.
People who need to use both classpath and sourcepath are probably targeting strange directory contents. For example, they might have a folder that contains source files and class files, but only want to have the source files searched for.