geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dillon" <>
Subject Re: Warning regarding Windows file path lengths with JDK 1.4
Date Wed, 11 Jan 2006 07:41:06 GMT
Sounds reasonable to me... Though you left out the last contingency... Which is to go get a
Mac ;-)


-----Original Message-----
From: John Sisson <>
Date: Wed, 11 Jan 2006 12:29:31
Subject: Re: Warning regarding Windows file path lengths with JDK 1.4

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):


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?


Alan D. Cabrera wrote:

>Hash: SHA1
>John Sisson wrote, On 1/7/2006 10:46 PM:
>>FYI.. We need to be careful of resulting file path lengths on Windows
>>when creating web applications that may result in long file paths in
>>Geronimo due to a JDK 1.4 bug (
>> that has
>>only been fixed in JDK 1.5_06.
>>Fom reading the bug and related bugs' descriptions it appears the
>>Windows JDK will only allow file names less than 260 bytes, otherwise a
>>FileNotFoundException is thrown.
>>I initially ran into this JDK bug whilst building geronimo under a long
>>directory name (see GERONIMO-1428 for details).
>>On a related note (not due to the JDK bug) I found that if I installed
>>geronimo from a zip distribution using WinZip (version 10.0 6685) into a
>>long directory path, WinZip also has problems:
>>Error:  The system cannot find the path specified.
>>Cannot create
>We can mitigate this problem by mapping the unpacked war name to
>something smaller, i.e. war_001.
>Version: GnuPG v1.4.2 (MingW32)
>Comment: Using GnuPG with Thunderbird -

View raw message