When trying to run the following command to compile some_file.java in Windows
javac -classpath "some_class_path" "some_file.java"
it fails, telling me I didn’t pass it any source files.
If instead I make
cd "some_class_path"
javac -classpath "some_class_path" "some_file.java"
it works fine. Why? This bothers me as I want to compile a set of .java files from my program through javac.
It would help if you could be more concrete about your description, but it looks like you’re expecting the classpath to be used to look for the files you specify on the command-line as well. It doesn’t work that way – the source files you specify must be the exact paths to those files.