You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jim Cheesman <jc...@msl.es> on 2001/05/23 15:30:07 UTC
Jar file loading
If I rename a jar file (on Win2000) from x.jar to x.jar_ ant will load it
(from ant\lib) correctly - yet if I name it x.txt (for example) it will not.
Is this because of ant or java? (Or is it correct behaviour?)
Jim
--
* Jim Cheesman *
Trabajo:
jchees@msl.es - (34)(91) 724 9200 x 2360
On one hand, I'm
indecisive, but on the other, I'm not.
Re: Jar file loading
Posted by Jim Cheesman <jc...@msl.es>.
At 04:00 PM 23/05/01, you wrote:
>Jim,
>
>Actually because of Windows.
Ah.... should have guessed! Further testing revealed that it didn't happen
on the Aix box we have here, although there was a different problem there,
which further adds to the confusion ;) On Aix, the classes are loaded
preferentially from the classpath, and then from ANT_HOME/lib, while on
Win2000 it's the other way round.
I spent hours tracing down why I was getting a deprecated warning for
org.xml.sax.Parser on Aix but not on my desktop machine: Win2000 was
loading parser.jar_ from lib, Aix was loading xerces.jar from my classpath,
and ignoring parser.jar in lib.
Still, if anyone needs a couple of utilities to trace down where a class is
being loaded from, I'm happy to share. (One's even defined as an ant task! ;)
Something to take note of for those of us using more than one
environment.... What can I expect to see if I move over to linux, for example?
Jim
--
* Jim Cheesman *
Trabajo:
jchees@msl.es - (34)(91) 724 9200 x 2360
On one hand, I'm
indecisive, but on the other, I'm not.
Re: Jar file loading
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Jim,
Actually because of Windows. I think if you look for *.jar in a batch file,
the old 8.3 thing comes out to play and you find files with any extension
starting with jar. It is probably this line in ant.bat
for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
I tried this
for %%i in ("%ANT_HOME%\lib\*.jar") do echo "%%i"
with the following results
"F:\Software\Ant\lib\ant.jar"
"F:\Software\Ant\lib\ant.jaroobah"
"F:\Software\Ant\lib\crimson.jar"
"F:\Software\Ant\lib\jaxp.jar"
"F:\Software\Ant\lib\optional.jar"
Gotta love that 8.3 legacy.
Conor
----- Original Message -----
From: "Jim Cheesman" <jc...@msl.es>
To: <an...@jakarta.apache.org>
Sent: Wednesday, May 23, 2001 11:30 PM
Subject: Jar file loading
> If I rename a jar file (on Win2000) from x.jar to x.jar_ ant will load it
> (from ant\lib) correctly - yet if I name it x.txt (for example) it will
not.
>
>
> Is this because of ant or java? (Or is it correct behaviour?)
>
>
> Jim
>
>
>
>
> --
>
> * Jim Cheesman *
> Trabajo:
> jchees@msl.es - (34)(91) 724 9200 x 2360
> On one hand, I'm
> indecisive, but on the other, I'm not.
>
>
>