Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 21109 invoked from network); 11 Oct 2000 21:58:02 -0000 Received: from bravo.interbind.com (HELO ibexc02.interbind.com) (160.79.178.130) by locus.apache.org with SMTP; 11 Oct 2000 21:58:02 -0000 Received: by IBEXC02 with Internet Mail Service (5.5.2650.21) id ; Wed, 11 Oct 2000 17:59:16 -0400 Message-ID: <27B90006C556D4119D5700508BDC9DDC112A7E@IBEXC02> From: Daniel Rosner To: "'ant-dev@jakarta.apache.org'" Subject: getting rid of lcp.bat? cmd batch file fun... Date: Wed, 11 Oct 2000 17:59:12 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C033CE.7F202DCE" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C033CE.7F202DCE Content-Type: text/plain; charset="iso-8859-1" FWIW, I was looking at the lcp.bat file and was scratching my head- I found what it did really convenient but thought it odd that it required a separate file. Obviously, it seemed to me that what you would expect is that: for %%i in (.\lib\*.jar) do call .\lcp.bat %%i could be replaced by: for %%i in (.\lib\*.jar) do set LOCALCLASSPATH=%LOCALCLASSPATH%;%1 But of course, someone else would have thought of that, and I see that it doesn't work. Incidentally, if anyone knows WHY ON EARTH that is, feel free to let me know... I see the behavior, but can't figure out what is going on. Anyway, after poking at that, I figured out that the following does work: for %%i in (.\lib\*.jar) do call :setpath %%i And further down in your batch file, you need a label with this code: :setpath set LOCALCLASSPATH=%LOCALCLASSPATH%;%1 YMMV, -Dan ------_=_NextPart_001_01C033CE.7F202DCE Content-Type: text/html; charset="iso-8859-1"

FWIW, I was looking at the lcp.bat file and was scratching my head- I found what it did really convenient but thought it odd that it required a separate file.

Obviously, it seemed to me that what you would expect is that:

for %%i in (.\lib\*.jar) do call .\lcp.bat %%i

could be replaced by:

for %%i in (.\lib\*.jar) do set LOCALCLASSPATH=%LOCALCLASSPATH%;%1

But of course, someone else would have thought of that, and I see that it doesn't work. Incidentally, if anyone knows WHY ON EARTH that is, feel free to let me know... I see the behavior, but can't figure out what is going on.

Anyway, after poking at that, I figured out that the following does work:

for %%i in (.\lib\*.jar) do call :setpath %%i

And further down in your batch file, you need a label with this code:

:setpath
set LOCALCLASSPATH=%LOCALCLASSPATH%;%1

YMMV,

-Dan

------_=_NextPart_001_01C033CE.7F202DCE--