Package java.net

Examples of java.net.URLClassLoader


      return new URL(finalizerUrl, urlString);
    }

    /** Creates a class loader with the given base URL as its classpath. */
    URLClassLoader newLoader(URL base) {
      return new URLClassLoader(new URL[] {base});
    }
View Full Code Here


        }
      } catch (MalformedURLException e) {
        // should not happen
      }
    }
    runtimeClassLoader = new URLClassLoader(
        classLoaderDirectories.toArray(new URL[] {}), Thread
            .currentThread().getContextClassLoader());
  }
View Full Code Here

      remoteClassLoader = (URLClassLoader) realClassLoader;
      localClassLoader = remoteClassLoader;
    }
    else {
      localClassLoader = realClassLoader;
      remoteClassLoader = new URLClassLoader(new URL[] {});
    }
  }
View Full Code Here

      File all = new File(jbossHome, "server/all");
      buildJarSet(all, jarFiles);
      URL[] cp = new URL[jarFiles.size()];
      jarFiles.toArray(cp);
      ClassLoader parent = Thread.currentThread().getContextClassLoader();
      URLClassLoader completeClasspath = new URLClassLoader(cp, parent);

      TreeMap classVersionMap = new TreeMap();
      Iterator jarIter = jarFiles.iterator();
      while( jarIter.hasNext() )
      {
View Full Code Here

      File lib = new File(j2eeHome, "lib");
      buildJarSet(lib, jarFiles);
      URL[] cp = new URL[jarFiles.size()];
      jarFiles.toArray(cp);
      ClassLoader parent = Thread.currentThread().getContextClassLoader();
      URLClassLoader completeClasspath = new URLClassLoader(cp, parent);

      TreeMap classVersionMap = new TreeMap();
      Iterator jarIter = jarFiles.iterator();
      while( jarIter.hasNext() )
      {
View Full Code Here

    List<String> identifiedTextures = new ArrayList<String>();

    for (URL pluginTexturesCatalogUrl : pluginTexturesCatalogUrls) {
      try {
        readTextures(ResourceBundle.getBundle(PLUGIN_TEXTURES_CATALOG_FAMILY, Locale.getDefault(),
                new URLClassLoader(new URL [] {pluginTexturesCatalogUrl})),
            pluginTexturesCatalogUrl, texturesResourcesUrlBase, textureHomonymsCounter, identifiedTextures);
      } catch (MissingResourceException ex) {
        // Ignore malformed textures catalog
      } catch (IllegalArgumentException ex) {
        // Ignore malformed textures catalog
View Full Code Here

      } else if (urlUpdate != null) {
        pluginTexturesCatalogUrl = urlUpdate;
      }
     
      ResourceBundle resourceBundle = ResourceBundle.getBundle(PLUGIN_TEXTURES_CATALOG_FAMILY, Locale.getDefault(),
          new URLClassLoader(new URL [] {pluginTexturesCatalogUrl}));     
      readTextures(resourceBundle, pluginTexturesCatalogUrl, null, textureHomonymsCounter, identifiedTextures);
    } catch (MissingResourceException ex) {
      // Ignore malformed textures catalog
    } catch (IllegalArgumentException ex) {
      // Ignore malformed textures catalog
View Full Code Here

    List<String> identifiedFurniture = new ArrayList<String>();

    for (URL pluginFurnitureCatalogUrl : pluginFurnitureCatalogUrls) {
      try {
        readFurniture(ResourceBundle.getBundle(PLUGIN_FURNITURE_CATALOG_FAMILY, Locale.getDefault(),
                new URLClassLoader(new URL [] {pluginFurnitureCatalogUrl})),
            pluginFurnitureCatalogUrl, furnitureResourcesUrlBase, furnitureHomonymsCounter, identifiedFurniture);
      } catch (MissingResourceException ex) {
        // Ignore malformed furniture catalog
      } catch (IllegalArgumentException ex) {
        // Ignore malformed furniture catalog
View Full Code Here

      } else if (urlUpdate != null) {
        pluginFurnitureCatalogUrl = urlUpdate;
      }
     
      ResourceBundle resourceBundle = ResourceBundle.getBundle(PLUGIN_FURNITURE_CATALOG_FAMILY, Locale.getDefault(),
          new URLClassLoader(new URL [] {pluginFurnitureCatalogUrl}));     
      readFurniture(resourceBundle, pluginFurnitureCatalogUrl, null, furnitureHomonymsCounter,
          identifiedFurniture);
    } catch (MissingResourceException ex) {
      // Ignore malformed furniture catalog
    } catch (IllegalArgumentException ex) {
View Full Code Here

                || zipEntryName.charAt(lastIndex - 1) == '/')) {
          try {
            // Build application plugin family with its package
            String applicationPluginFamily = zipEntryName.substring(0, lastIndex);
            applicationPluginFamily += APPLICATION_PLUGIN_FAMILY;
            ClassLoader classLoader = new URLClassLoader(new URL [] {pluginUrl}, getClass().getClassLoader());
            readPlugin(ResourceBundle.getBundle(applicationPluginFamily, Locale.getDefault(), classLoader),
                "jar:" + pluginUrl.toString() + "!/" + URLEncoder.encode(zipEntryName, "UTF-8").replace("+", "%20"),
                classLoader);
          } catch (MissingResourceException ex) {
            // Ignore malformed plugins
View Full Code Here

TOP

Related Classes of java.net.URLClassLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.