tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject use of NT drive specifier in Javac classpath
Date Sun, 26 Dec 1999 14:38:52 GMT

I think there has been some discussion about how classpaths are handled in
the Javac taskdef with regard to platform specific behaviour. I don't know
what the latest word is but the current implementation causes me a few

As I understand the current behaviour, the Javac classpath can contain
either ':' or ';' as path separators and '/' or '\' as file separators.
These are translated on the fly to the platform specific path and file
separators. In general I like this behaviour, since you can use either
Windows or Unix style paths and it will work (don't know what Mac users do).
Unfortunately this scheme does not support the Windows drive specifier
format such as E:\tomcat\lib\servlet.jar.

I have added a quick patch to to change the translation
behaviour. Now ':' is only considered a path separator if it is not followed
immediately by a '\' character. This essentially retains the current
behaviour but also accepts the drive specifier format.

I guess this might warrant some discussion before the patch is applied.


RCS file:
retrieving revision 1.21
diff -r1.21
>         int processLength = to_process.length();
<         StringBuffer bs = new StringBuffer(to_process.length() + 50);
>         StringBuffer bs = new StringBuffer(processLength + 50);
<         for (char c = sci.first(); c != CharacterIterator.DONE; c = {
>         int index = 0;
>         for (char c = sci.first(); c != CharacterIterator.DONE; c =, ++index) {
<             if (tmp.equals(":") || tmp.equals(";"))
>             if (tmp.equals(":") && (index == processLength - 1 ||
to_process.charAt(index+1) != '\\')
>                 || tmp.equals(";"))

Conor MacNeill
M64 Pty Limited

View raw message