This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: java.io.File


Heitzso wrote:
> Take the following with a grain of salt since I am not an expert in 
> these matters.
> 
> On Windows using Sun 1.4.2_04 File.getAbsolutePath() will return:
>     C:\some\path
> for a path on a normal hard drive or on a networked drive
> but for a CDROM drive (assume E: is cdrom drive) it returns:
>     E:\\some\path
> i.e. an extra backslash is inserted.  (Tested Win2K, 1.4.2_04).
> 
> In my app I code around that anomaly.  I don't know if that is a bug
> or a feature in Sun's jvm on Windows.

Are you sure about this? I noticed the double backslash too, but AFAICT
it is unrelated to the type of drive. BTW, libgjc does exactly the same
thing as Sun. I consider it a bug in Sun's implementation, but it's
harmless and I (almost) always prefer compatibility with the Sun
implementation.

Regards,
Jeroen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]