You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2002/04/16 20:58:43 UTC

DO NOT REPLY [Bug 8173] New: - Example.bat files set classpath incorrectly.

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8173

Example.bat files set classpath incorrectly.

           Summary: Example.bat files set classpath incorrectly.
           Product: Velocity
           Version: 1.2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Source
        AssignedTo: velocity-dev@jakarta.apache.org
        ReportedBy: dale@sirsi.com


The batch files to run the examples on Win32 systems include the following:

set VELCP=.
for %%i in (..\..\bin\*.jar) do set VELCP=%VELCP%;%%i
for %%i in (..\..\build\lib\*.jar) do set VELCP=%VELCP%;%%i

Unfortunately %VELCP% in the for statements gets evaluated when the command is
initially parsed.  Thus if ..\..\bin\*.jar containd a.jar, b.jar, c.jar the 
first for would expand to:
  set VELCP=.;a.jar
  set VELCP=.;b.jar
  set VELCP=.;c.jar
a.jar and b.jar are lost.
---
workaround:
for %%i in (..\..\bin\*.jar) do call appendVELCP %%i

File appendVELCP.bat:
set VELCP=%VELCP%;%1
---
It ain't pretty, but it works.
PS: I couldn't figure out which Component this is.  I guess source is close(?)

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>