Community
Participate
Working Groups
3.2 RC2 using the batch compiler with the following arguments: X.java -5. yields the following error message: directory does not exist: -5. whereas the following arguments: X.java -5.0 yield a normal compilation using the 5.0 compliance option. The usage recommandation is <options> <source files | directories>, which would suggest that both command lines should yield the same result (-5. or -5.0 should not be recognized as options). If on the contrary we want to be more flexible and allow options to follow sources, then the first command line should yield a more explicit message, aka 'unsupported option: 5.'. In the latter case, specifying directory names starting with '-' can be a pain. A classical solution is to consider that anything that follows a ' -- ' key is not an option. Note: authorizing the mangling of options and arguments is most often a sign that the considered command is capable of applying different options sets to each argument. For example: command -o1 file1 -o2 file2 would specify options o1 for file1, and o1 and o2 for file2. Since the batch compiler does not have this capability, we may want to enforce a strong and clear rule, namely the one given by the current usage message.
Right now by default, any unrecognized options is considered to be a directory or a file name.