Exemple #1
0
 public JavaCompile(String path) {
   dirs =
       path.split(
           System.getProperty(
               "path.separator")); // use both the Linux/Unix (i.e. ":") and the Windows separators
                                   // (i.e. ";")
 }
Exemple #2
0
 public JavaCompile(String path, ClassLoader parent) {
   super(parent);
   dirs =
       path.split(
           System.getProperty(
               "path.separator")); //// use both the Linux/Unix (i.e. ":") and the Windows
                                   // separators (i.e. ";")
 }
Exemple #3
0
 // extend the class path in order to search the path(s) designated with the parameter path also
 public void extendClassPath(String path) {
   // if path is already in the extension's loader class path do not reinsert it
   for (int k = 0; k < dirs.length; k++) {
     if (dirs[k].equals(path)) return;
   }
   String[] exDirs =
       path.split(System.getProperty("path.separator")); // vector with the paths to be added
   String[] newDirs = new String[dirs.length + exDirs.length + 1];
   newDirs[0] = GlobalValues.jarFilePath;
   System.arraycopy(dirs, 0, newDirs, 1, dirs.length); // copy current path
   System.arraycopy(exDirs, 0, newDirs, dirs.length + 1, exDirs.length); // append new paths
   dirs = newDirs;
 }