Let's assume I would like to execute a Java application:
java -cp j1:j2...:j9999 Main arg1 arg2
In this case, the java executable gets a plethora of arguments which, on certain OSes, can cause problems due to the length limitation of the command line string (see Maximum Length of Command Line String).
As a remedy, javac
offers the @argfile
(see here) which allows specifying the arguments within a file. The above example would look like this, if java
supported it as well:
java @FileContainingArguments.txt
and the content of FileContainingArguments.txt
is:
-cp j1:j2...:j9999
Main
arg1
arg2
So the question is, why java
doesn't support it, while javac
and javadoc
do?