File path in Command line arguments
<p>In my current project, I am writing  code generator. The interface would be Command line.</p>

<p>In command line argument,  user specifies specification files and destination folder,  Which guides the code generator to generate files in specific destination folder.</p>

<p>For instance, my command line argument would be</p>

<pre><code>VocArchSpec.text NetworkSpec.text ./src/fr/inria/arles/pankesh/gen ./src/fr/inria/arles/pankesh/gen/logic ./src/fr/inria/arles/pankesh/gen/sim/device ./src/fr/inria/arles/pankesh/gen/util
</code></pre>

<p>In the above command, 1 and 2 are specification and others are path of destination. This path is used by code generator. The code generator generates several java files in the specified destination folder.</p>

<p>But, my problem is I am getting following error :</p>

<pre><code>java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
</code></pre>

<p>===============> I use following code to generate files.</p>

<pre><code>new File(GlobalVariable.utilDirPath).mkdir(); // Assume that I set the value GlobalVariable.utilDirPath variable through command line arguments. 
file = new File(GlobalVariable.utilDirPath + "/" + unit.getName());
file.createNewFile();
FileWriter writer = new FileWriter(file);
writer.write(content);
writer.flush();
Writer.close();
</code></pre>
