[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: findjava is the question, is fixjava the answer?



Hi Alexander,

T. Alexander Popiel wrote:

I have not found any documented way of replacing the parser version.
Mangling bootclasspath to do it isn't documented, either... but follows
from first principles.

See docs for org.xml.sax.helpers.XMLReaderFactory. citing the docs: "This method uses the value of the system property "org.xml.sax.driver" as the full name of a Java class and tries to instantiate that class as a SAX2 XMLReader."

Given that the code which is having trouble is being run inside both
jboss and weblogic, we don't have particularly good control of the
classloader (unless we do a whole bunch of platform-specific dinking
for each one).

I'm not quite sure I get that. Can't you use your own class loader to load the main class, and have it delegate to the proper jar for the classes whose names start with 'org.xml' or 'org.apache' or whatever the xerces prefix is? Lookup docs for Thread.setContextClassLoader , it could help there.

The core libraries have no business depending on or including separately
distributable packages like xerces... but that's a rant for another day.

Agreed.

cheers,
dalibor topic




Reply to: