ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39932] New: - lcp.bat prepends rather than appends
Date Thu, 29 Jun 2006 15:23:37 GMT
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: LJS@LJSConsulting.com
                CC: LJS@LJSConsulting.com


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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message