Can people with exotic java versions please try running the following java
program.

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.exit(1);
        }
      }
    }
    if (name == null) {
      System.err.println("Cannot auto-detect boot class path");
      System.exit(1);
    }
    System.out.println(System.getProperty(name));
  }
}


I'm trying to see if this works for all JVMs (i.e it never exits with exit
code 1)

Reply via email to