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)
>

Attachment: ShowClassPath.class
Description: Binary data

Attachment: ShowClassPath.java
Description: Binary data

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to