geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan D. Cabrera" <>
Subject Re: Warning regarding Windows file path lengths with JDK 1.4
Date Wed, 11 Jan 2006 02:15:07 GMT
On 1/10/2006 5:29 PM, John Sisson wrote:

> Mapping the file name would reduce the length a bit, but i am 
> wondering if it is really worth the complexity for the small gain in 
> reduction of characters in the file path.
> For users on JDK 1.5_06 (where the JDK bug is fixed), there are still 
> some related issues that I found after further investigation..
> A lot of windows programs are coded to use MAX_PATH, which is defined 
> as 260 characters.  If the windows unicode API is used to create the 
> file, paths longer than 256 characters can be used, which is what the 
> JDK bug fix does AFAIK.

> Examples of Windows XP programs that have problems with long file 
> paths are windows explorer and the the CMD shell (I tried them).  
> Hopefully decent backup programs work with paths greater than 260 chars..
> WinZip is another example of a program that has problems, so as a 
> workaround users on JDK 1.5_06 can extract the zip with the JDK jar 
> utility (I have confirmed it worked with the following command):
> C:\test\this\is\a\really\long\install\directory\name\to\demonstrate\jdk\bug\6182812>"C:\Program

> Files\Java\jdk1.5.0_06\bin\jar" xvf
> Another workaround for users on JDK 1.4.2 is to install to a different 
> (shorter) location, or shorten file names in their web applications.
> Do people think that the above workarounds are acceptable and it isn't 
> worth trying to shorten our file paths?

Makes sense to me.


View raw message