/[EMAIL PROTECTED]/:

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).

I can't help you much more as to ask you to check if you're really using Java 5 (instead of Java 1.4) system library with your Eclipse project configuration.

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).

The "xml-apis.jar" must always go in the endorsed libraries. Additionally with Sun's JDK 1.4/5 one could use the command-line option:

 -Xbootclasspath/p:<directories and zip/jar files separated by ;>

with the Java launcher and:

 -bootclasspath <path>

with the Java compiler (note the system library "<jre>/lib/rt.jar" must be explicitly added if overriding the boot class path for the compiler).

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?

AFAIK the Sun's Java 5 includes Xerces but with a renamed package structure, so classes (other than "xml-apis.jar") should not collide.

Where is the class loading order for Java documented?

Apart from the "Endorsed Standards Override Mechanism" (i.e. using the "java.endorsed.dirs" system property) I don't know if there are other requirements for the different implementations. I guess no classes under the 'java.*' package hierarchy may get overridden, for example.

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?

These one could test in practice.

--
Stanimir


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to