Index: xml/core/manifest.mf =================================================================== RCS file: /cvs/xml/core/manifest.mf,v retrieving revision 1.26 diff -u -r1.26 manifest.mf --- xml/core/manifest.mf 2 Nov 2002 21:11:31 -0000 1.26 +++ xml/core/manifest.mf 13 Nov 2002 21:54:33 -0000 @@ -7,14 +7,14 @@ OpenIDE-Module-Public-Packages: org.netbeans.modules.xml.api.**, org.netbeans.modules.xml.spi.** -OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.17 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.21 OpenIDE-Module-Module-Dependencies: org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@, org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@, org.openide.deprecated > 1.0, org.openide.execution > 1.0, org.openide.io > 1.0 -OpenIDE-Module-Requires: org.openide.TopManager, org.openide.windows.IOProvider +OpenIDE-Module-Requires: org.openide.TopManager, org.openide.windows.IOProvider, org.openide.modules.InstalledFileLocator Class-Path: docs/xml-core.jar Name: org/netbeans/modules/xml/core/XMLDataLoader.class Index: xml/core/src/org/netbeans/modules/xml/core/tree/ParserLoader.java =================================================================== RCS file: /cvs/xml/core/src/org/netbeans/modules/xml/core/tree/ParserLoader.java,v retrieving revision 1.4 diff -u -r1.4 ParserLoader.java --- xml/core/src/org/netbeans/modules/xml/core/tree/ParserLoader.java 11 Jun 2002 17:00:16 -0000 1.4 +++ xml/core/src/org/netbeans/modules/xml/core/tree/ParserLoader.java 13 Nov 2002 21:54:33 -0000 @@ -15,6 +15,7 @@ import java.io.*; import java.net.*; import java.util.*; +import org.openide.modules.InstalledFileLocator; /** * A filtering classloader (isolator) ensuring that a particuler version of @@ -40,7 +41,7 @@ // parser library relative to module directory // library itself can not have a jar extension // to avoid loading it by module classloader - private static final String PARSER_MODULES_LIB = "/modules/autoload/ext/xerces2.jar"; // NOI18N + private static final String PARSER_MODULES_LIB = "modules/autoload/ext/xerces2.jar"; // NOI18N // delegating classloader private ClassLoader parentLoader; @@ -49,8 +50,8 @@ private static ParserLoader instance = null; /** Creates new ParserLoader */ - private ParserLoader(URL library) { - super(new URL[] { library }); + private ParserLoader(URL[] libraries) { + super(libraries); parentLoader = org.openide.TopManager.getDefault().systemClassLoader();//getClass().getClassLoader(); } @@ -63,29 +64,17 @@ if (instance != null) return instance; try { - String prop; - URL xer2url; - - prop = System.getProperty("netbeans.user"); // NOI18N - xer2url = new URL("file:" + prop + PARSER_MODULES_LIB); // NOI18N - - try { - // just skip netbeans home - xer2url.openStream(); - } catch (IOException ex) { - prop = System.getProperty("netbeans.home"); // NOI18N - xer2url = new URL("file:" + prop + PARSER_MODULES_LIB); // NOI18N - } - - if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("Isolated jar URL=" + xer2url); // NOI18N - - instance = new ParserLoader(xer2url); // URL module = instance.getClass().getProtectionDomain().getCodeSource().getLocation(); + // Could also use InstalledFileLocator here, but this should suffice: URL module = org.netbeans.tax.io.XNIBuilder.class.getProtectionDomain().getCodeSource().getLocation(); if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("Isolated module URL=" + module); // NOI18N - instance.addURL(module); + URL xer2url = InstalledFileLocator.getDefault().locate(PARSER_MODULES_LIB, "org.netbeans.modules.xml.tax", false).toURL(); // NOI18N + + if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("Isolated jar URL=" + xer2url); // NOI18N + + instance = new ParserLoader(new URL[] {xer2url, module}); } catch (MalformedURLException ex) { if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug (ex); }