Dan,
> -----Original Message----- > From: Daniel Rosner [mailto:[EMAIL PROTECTED] > Sent: Thursday, 12 October 2000 8:59 > To: '[EMAIL PROTECTED]' > Subject: getting rid of lcp.bat? cmd batch file fun... > > > 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 > You probably need to use %%i instead of %1. Pretty sure I had this working at one stage (before I tried it on Win9x). > 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, Indeed, none of this will work on Win 9X which is the whole reason that lcp.bat is used. If you can find a clean solution for all Windows platforms we would be really keen to see it. For now , it is a lowest common denominator approach (and with Win9x, that is pretty low :-) Conor
