DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39932>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39932

           Summary: lcp.bat prepends rather than appends
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: Wrapper scripts
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Consider the following bat file:

@ECHO OFF
SET LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%J2EE_HOME%\lib\j2ee.jar
FOR %%i IN ("somedir\lib\*.jar") DO CALL lcp.bat %%i
echo %LOCALCLASSPATH%

It would appear that as the files in the directory are traversed that they would
be appended one-by-one to the LOCALCLASSPATH environment variable.  However
lcp.bat actually *PREPENDS* as is shown by the last two lines shown below:

:gotAllArgs
set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%

I suggest that the last statement be changed as shown below so that the
resulting classpath is as would be expected:

:gotAllArgs
set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT%

I know this may seem like a silly and trivial matter, but I just spent a great
deal of time determining why a different class was being used at runtime than
the one I would have expected.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to