Following on from a previous question, for some reason when I use the following code :
final File tmpDir = new File("C:/TEMP/", zipFile.getName());
if(!tmpDir.mkdir() && tmpDir.exists()) {
System.err.println("Cannot create: " + tmpDir);
System.exit(0);
}
I get an error (Cannot create: C:\TEMP\aZipFile) however, if I use the following:
final File tmpDir = new File(System.getProperty("java.io.tmpdir"), zipFile.getName());
if(!tmpDir.mkdir() && tmpDir.exists()) {
System.err.println("Cannot create: " + tmpDir);
System.exit(0);
}
it works perfectly. My problem is that I want to use C:\TEMP as this is consistent with the rest of the project I am working on.
Again, I’m using Java 1.4 on Windows XP and JDeveloper IDE.
Shouldn’t this be: