New version works with:

Sun JVM: 1.1.8, 1.2.2, 1.3.1_20, 1.4.1_01, 1.4.2_12, 1.4.2_20, 1.5.0_11,
1.5.0_12, 1.5.0_16, 1.6.0_05
JRockit: R27.4.0-jdk1.4.2_15, R27.4.0-jdk1.5.0_12, R27.4.0-jdk1.6.0_12
IBM: 1.5.0 build 2.3, 1.6.0 build 2.4
GCJ: 1.4.2 (Red Hat 4.1.2-44)

2009/9/18 Stephen Connolly <[email protected]>

> OK from my testing.... does not work with Sun java 1.1....
>
> I have a modified version... which is attached as well as the compiled
> version for java 1.1 (which should work for everyone)
>
> 2009/9/18 Stephen Connolly <[email protected]>
>
> 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