import java.util.*;

public final class ShowClassPath {
  public static void main(String[] args) {
    String cp = System.getProperty("sun.boot.class.path");
    if (cp != null) {
      System.out.println(cp);
      return;
    }
    cp = System.getProperty("java.boot.class.path");
    if (cp != null) {
      System.out.println(cp);
      return;
    }
    Enumeration i = System.getProperties().propertyNames();
    String name = null;
    while (i.hasMoreElements()) {
      String temp = (String)i.nextElement();
      if (temp.indexOf(".boot.class.path") != -1) {
        if (name == null) {
          name = temp;
        } else {
          System.err.println("Cannot auto-detect boot class path " + System.getProperty("java.version"));
          System.exit(1);
        }
      }
    }
    if (name == null) {
        String version = System.getProperty("java.version");
        if (version.startsWith("1.1.")) {
           cp = System.getProperty("java.class.path");
           String prefix = "." + System.getProperty("path.separator");
           if (cp.startsWith(prefix)) {
               cp = cp.substring(prefix.length());
           }
           System.out.println(cp);
           return;
        }
      System.err.println("Cannot auto-detect boot class path " + System.getProperty("java.version") + " " + System.getProperty("java.class.path"));
      System.exit(1);
    }
    System.out.println(System.getProperty(name));
  }
}
