java.io.File

Jeroen Frijters jeroen@sumatra.nl
Thu Jul 22 14:48:00 GMT 2004


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /