Re: Is there an option for auto-create output dirs when compiling with javac?



"Catherina Svensson" <gremlin@xxxxxxxxxxx> wrote in message
news:4816bba0$0$6769$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When I perform a compiling operation like:

javac -d build\WEB-INF\classes my.java

and the directory build\WEB-INF\classes does NOT exist then the javac
command fails.

Is there really no auto-create-dir-when-necessary option for javac ?

Cat

Not in the sense that you mean. The location pointed to by the -d option
must exist. Bear in mind that javac will certainly create directories as
required *in* the location you specify...for example:

javac -d targetdir dirA\dirB\*.java

will create

dirA\dirB\*.class

inside "targetDir".

Note that the explanation of the -d option in the javac documentation does
say that the destination directory will *not* be created.

AHS


.