Further developments .. !

I removed the xerces.jar from my CLASSPATH, before calling ant and it
compiled the classes!

I have a few questions!
(1) I see that there are some SAX classes supplied with ant:

trdbd04:srtre>jar -tvf jaxp.jar | grep SAX
  1478 Thu Mar 30 18:21:24 BST 2000 javax/xml/parsers/SAXParserFactory.class
  1969 Thu Mar 30 18:21:24 BST 2000 javax/xml/parsers/SAXParser.class
trdbd04:srtre>jar -tvf parser.jar | grep SAX
   731 Thu Mar 30 18:21:18 BST 2000 org/xml/sax/SAXException.class
  1372 Thu Mar 30 18:21:18 BST 2000 org/xml/sax/SAXParseException.class
   550 Thu Mar 30 18:21:50 BST 2000
com/sun/xml/parser/SAXParserFactoryImpl.class
  1151 Thu Mar 30 18:21:50 BST 2000 com/sun/xml/parser/SAXParserImpl.class
trdbd04:srtre>jar -tvf ant.jar | grep SAX 

And given that the order the *.jars appear in the classpath are significant,
I would guess that ant is happily using these SAX* classes to run with and
also using them in the compile of my code.

How can I get round this behaviour to use the SAX* classes from the
xerces.jar?  Is it necessary?

(2) Why did my build in NT work?

Well the script which updates the local classpath prefixes the existing
localclasspath with the ant libraries
set LOCALCLASSPATH=%1;%LOCALCLASSPATH%

On Solaris it puts them on the end (taken from ${ANT_HOME)/bin/ant):

# add in the dependency .jar files
DIRLIBS=${ANT_HOME}/lib/*.jar
for i in ${DIRLIBS}
do
    # if the directory is empty, then it will return the input string
    # this is stupid, so case for it
    if [ "$i" != "${DIRLIBS}" ] ; then
        LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
    fi
done

if [ "$CLASSPATH" != "" ] ; then
  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
fi

Is this behaviour intended, if so can someone please explain why?


Best regards


Simon

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 26 April 2001 12:37
To: [EMAIL PROTECTED]
Subject: Cannot load class SAXParserFactory class


I've managed to get Ant working on NT.  However when I move the development
to Solaris I get the following exception (see attached):

 <<ant.txt>> 
The script I use outputs the values of LOCALCLASSPATH and CLASSPATH before
running org.apache.tools.ant.Main.

We're using java 1.3 on NT and Solaris.  And we've put javax.jar into the
${JAVA_HOME}/jre/lib directory (I saw this on the mail list archive).

But I'm buggered if I can figure out what's going on.

Any ideas / suggestions would be greatly appreciated.

Simon

> Simon Richardson
> Technology
> Tel: 020 7574 8838
> E Mail: [EMAIL PROTECTED]
> 
> Halifax Group Treasury & Wholesale Banking
> 33 Old Broad Street
> London
> EC2N 1HZ
> 

----------------------------------------------------------------------------
--
Part of the Halifax Group, Halifax plc, Registered in England No. 2367076.
Registered Office: Trinity Road, Halifax, West Yorkshire HX1 2RG. Represents
only the Halifax Financial Services Marketing Group for the purposes of
advising on and selling life assurance, pensions and unit trust business.
The Marketing Group is regulated by the Personal Investment Authority.
Switchboard 01422 333333.


============================================================================
==

------------------------------------------------------------------------------
Part of the Halifax Group, Halifax plc, Registered in England No. 2367076.  Registered 
Office: Trinity Road, Halifax, West Yorkshire HX1 2RG. Represents only the Halifax 
Financial Services Marketing Group for the purposes of advising on and selling life 
assurance, pensions and unit trust business.  The Marketing Group is regulated by the 
Personal Investment Authority.  Switchboard 01422 333333.


==============================================================================

Reply via email to