/** * Add all the jar files in a dir to the classpath, represented as a Vector * of URLs. */ public static void addToClassPath(Vector<URL> cpV, String dir) { try { String cpComp[] = getFilesByExt(dir, ".jar"); if (cpComp != null) { int jarCount = cpComp.length; for (int i = 0; i < jarCount; i++) { URL url = getURL(dir, cpComp[i]); if (url != null) cpV.addElement(url); } } } catch (Exception ex) { ex.printStackTrace(); } }
/** * Add all the jar files in a dir to the classpath, represented as a Vector * of URLs. * @deprecated Is used only by deprecated method */ @Deprecated public static void addToClassPath(Vector<URL> cpV, String dir) { try { String cpComp[] = getFilesByExt(dir, ".jar"); if (cpComp != null) { int jarCount = cpComp.length; for (int i = 0; i < jarCount; i++) { URL url = getURL(dir, cpComp[i]); if (url != null) cpV.addElement(url); } } } catch (Exception ex) { ex.printStackTrace(); } }
/** * Add all the jar files in a dir to the classpath, represented as a Vector * of URLs. */ public static void addToClassPath(Vector cpV, String dir) { try { String cpComp[] = getFilesByExt(dir, ".jar"); if (cpComp != null) { int jarCount = cpComp.length; for (int i = 0; i < jarCount; i++) { URL url = getURL(dir, cpComp[i]); if (url != null) cpV.addElement(url); } } } catch (Exception ex) { ex.printStackTrace(); } }
/** * Add all the jar files in a dir to the classpath, represented as a Vector * of URLs. * @deprecated Is used only by deprecated method */ @Deprecated public static void addToClassPath(Vector<URL> cpV, String dir) { try { String cpComp[] = getFilesByExt(dir, ".jar"); if (cpComp != null) { int jarCount = cpComp.length; for (int i = 0; i < jarCount; i++) { URL url = getURL(dir, cpComp[i]); if (url != null) cpV.addElement(url); } } } catch (Exception ex) { ex.printStackTrace(); } }
/** * Construct a URL classpath from files in a directory, a cpath property, * and tools.jar. * @deprecated Not used */ @Deprecated public static URL[] getClassPath(String dir, String cpath, String cpathProp, boolean addTools) throws IOException, MalformedURLException { Vector<URL> jarsV = new Vector<URL>(); if (dir != null) { // Add dir/classes first, if it exists URL url = getURL(dir, "classes"); if (url != null) jarsV.addElement(url); addToClassPath(jarsV, dir); } if (cpath != null) addJarsFromClassPath(jarsV, cpath); if (cpathProp != null) { String cpath1 = System.getProperty(cpathProp); addJarsFromClassPath(jarsV, cpath1); } if (addTools) addToolsJar(jarsV); return getClassPath(jarsV); }
/** * Construct a URL classpath from files in a directory, a cpath property, * and tools.jar. */ public static URL[] getClassPath(String dir, String cpath, String cpathProp, boolean addTools) throws IOException, MalformedURLException { Vector jarsV = new Vector(); if (dir != null) { // Add dir/classes first, if it exists URL url = getURL(dir, "classes"); if (url != null) jarsV.addElement(url); addToClassPath(jarsV, dir); } if (cpath != null) addJarsFromClassPath(jarsV, cpath); if (cpathProp != null) { String cpath1 = System.getProperty(cpathProp); addJarsFromClassPath(jarsV, cpath1); } if (addTools) addToolsJar(jarsV); return getClassPath(jarsV); }
/** * Construct a URL classpath from files in a directory, a cpath property, * and tools.jar. * @deprecated Not used */ @Deprecated public static URL[] getClassPath(String dir, String cpath, String cpathProp, boolean addTools) throws IOException, MalformedURLException { Vector<URL> jarsV = new Vector<URL>(); if (dir != null) { // Add dir/classes first, if it exists URL url = getURL(dir, "classes"); if (url != null) jarsV.addElement(url); addToClassPath(jarsV, dir); } if (cpath != null) addJarsFromClassPath(jarsV, cpath); if (cpathProp != null) { String cpath1 = System.getProperty(cpathProp); addJarsFromClassPath(jarsV, cpath1); } if (addTools) addToolsJar(jarsV); return getClassPath(jarsV); }
/** * Construct a URL classpath from files in a directory, a cpath property, * and tools.jar. */ public static URL[] getClassPath(String dir, String cpath, String cpathProp, boolean addTools) throws IOException, MalformedURLException { Vector<URL> jarsV = new Vector<URL>(); if (dir != null) { // Add dir/classes first, if it exists URL url = getURL(dir, "classes"); if (url != null) jarsV.addElement(url); addToClassPath(jarsV, dir); } if (cpath != null) addJarsFromClassPath(jarsV, cpath); if (cpathProp != null) { String cpath1 = System.getProperty(cpathProp); addJarsFromClassPath(jarsV, cpath1); } if (addTools) addToolsJar(jarsV); return getClassPath(jarsV); }