Search

Categories

Links

Referers

Strange filenames on Windows

Feb 02 2006, 09:45:46 PM PST »Java Comments [2]
Perhaps you're aware that files like CON, NUL, etc are reserved filenames on Windows. Sherman (Xueming) has just fixed java.io.File so that it should be possible to fix this old issue in the compiler: 4190157.
Post a Comment:
Comments are closed for this entry.
Comments:

Of course, ideally javac would not write class files to disk; rather, it should create a jar file directly, with a user-provided filename. (If the user specifies con as the jar file name, that's their problem.) That would also solve case-insensitivity issues, BTW.

Posted by Bart Jacobs on February 03, 2006 at 07:23 AM PST #

The primary task for javac is to be a Java compiler. Not a make system nor a packaging system. So it is unlikely that you will ever see javac generate jar files directly. However, with the addition of the compiler API (JSR 199) in Mustang projects like Ant can easily override how javac stores files. I have tested that using JSR 199 you can compile directly to a jar file. However, during devlopment it is often much faster to compiler to a directory which ends in .jar. This is because adding new files to a zip file is a slow operation.

Posted by Peter von der Ahe on February 03, 2006 at 01:19 PM PST #

Java is a trademark of Sun Microsystems, Inc.
Copyright © 2006,2007 Peter von der Ahé