The flags -s -d -h all specify output directories - it's surprising if they handle non-existent directories differently. But they do:
$ for flag in -d -s -h; do echo $flag ---; javac $flag NOSUCHDIR Main.java; done
-d ---
javac: directory not found: NOSUCHDIR
Usage: javac <options> <source files>
use -help for a list of possible options
-s ---
javac: directory not found: NOSUCHDIR
Usage: javac <options> <source files>
use -help for a list of possible options
-h ---
$ for flag in -d -s -h; do echo $flag ---; javac $flag NOSUCHDIR Main.java; done
-d ---
javac: directory not found: NOSUCHDIR
Usage: javac <options> <source files>
use -help for a list of possible options
-s ---
javac: directory not found: NOSUCHDIR
Usage: javac <options> <source files>
use -help for a list of possible options
-h ---
- duplicates
-
JDK-8141460 javac -h NOSUCHDIR should fail, as -s and -d do
-
- Closed
-