Пример #1
0
  private Path computeBootClassPath() {
    bootClassPathRtJar = null;
    String optionValue;
    Path path = new Path();

    path.addFiles(options.get(XBOOTCLASSPATH_PREPEND));

    if ((optionValue = options.get(ENDORSEDDIRS)) != null) path.addDirectories(optionValue);
    else path.addDirectories(System.getProperty("java.endorsed.dirs"), false);

    if ((optionValue = options.get(BOOTCLASSPATH)) != null) {
      path.addFiles(optionValue);
    } else {
      // Standard system classes for this compiler's release.
      String files = System.getProperty("sun.boot.class.path");
      path.addFiles(files, false);
      File rt_jar = new File("rt.jar");
      for (File file : getPathEntries(files)) {
        if (new File(file.getName()).equals(rt_jar)) bootClassPathRtJar = file;
      }
    }

    path.addFiles(options.get(XBOOTCLASSPATH_APPEND));

    // Strictly speaking, standard extensions are not bootstrap
    // classes, but we treat them identically, so we'll pretend
    // that they are.
    if ((optionValue = options.get(EXTDIRS)) != null) path.addDirectories(optionValue);
    else path.addDirectories(System.getProperty("java.ext.dirs"), false);

    return path;
  }