Since it is true only for cmd shell on Windows.You can use *.java for compiling all the files in a directory. However, writing * for a directory is incorrect. For example, the following is correct:
javac --module-source-path src -d out src/foo.bar/f/b/*.java src/foo.bar/f/c/*.java/
Strictly saying, program javac itself cannot consume any templates like *.java in parameters. Such templates consumed by shell (e.g. cmd or bash) and converted to list of file names which passed to javac program as parameters. For bash it is known as Pathname expansion.
So following command will work fine in bash shell:
Code: Select all
javac --module-source-path src -d out src/foo.bar/*/*/*.java
Code: Select all
javac --module-source-path src -d out 'src/foo.bar/f/b/*.java' 'src/foo.bar/f/c/*.java
Usage: javac <options> <source files>
use --help for a list of possible options
Sorry for being pedantic, as Linux user I couldn't pass it up