For Eclipse, I did have the system library above the Xerces library. I tried
moving that below the xerces jars (xercesimpl.jar and xml-apis.jar) but this
made no difference in Eclipse (i.e. the test file still compiled without
error).
For the command-line, I tried an experiment of *removing* my explicit
reference to xercesimpl.jar and xml-apis.jar in the -cp argument but this
made no difference (i.e. the test file still compiled *with* the error).
I will download xerces 2.7.1 and try that, but in the meantime I am
wondering what I am observing. Does Java 1.5 include a "built-in" version of
xerces? If not, wouldn't I have received more errors when I ran the
command-line experiment above?
Where is the class loading order for Java documented? I have looked in vain
to find this. That is, among:
--java's "built-in" libraries;
--jars in the endorsed directory;
--jars specified via CLASSPATH or -cp (mutually exclusive?);
--jars specified as the runnable target;
--(others...?)
... In what precedence order are these searched?
Original Message:
-----------------
From: Stanimir Stamenkov [EMAIL PROTECTED]
Date: Sun, 06 Nov 2005 17:51:15 +0200
To: j-users@xerces.apache.org
Subject: Re: inside/outside eclipse vs java 1.4/1.5 vs xerces problem
/michael sorens/:
(1) Why am I seeing a difference between command-line and Eclipse
compilation?
Check your Eclipse project configuration - you've most probably got
the Xerces library set before the System library, which is really
loaded at JVM boot, i.e. before Xerces, during run-time (incl. using
the command line compiler).
(2) What is causing the compilation error at all?
I guess it is because Xerces 2.6.2 included experimental support for
DOM 3 but using different package names (see
'org.apache.xerces.dom3' vs. 'org.w3c.dom') and the Xerces revision
included in the Sun's Java 5 implementation is somewhat newer. You
may try using Xerces 2.7.1 instead.
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]