protected void checkSystemProperties ( Hashtable h ) { if ( null == h ) h = new Hashtable ( ) ; // Grab java version for later use try { String javaVersion = System . getProperty ( "java.version" ) ; h . put ( "java.version" , javaVersion ) ; } catch ( SecurityException se ) { // For applet context, etc. h . put ( "java.version" , "WARNING: SecurityException thrown accessing system version properties" ) ; } // Printout jar files on classpath(s) that may affect operation // Do this in order try { // This is present in all JVM's String cp = System . getProperty ( "java.class.path" ) ; h . put ( "java.class.path" , cp ) ; Vector classpathJars = checkPathForJars ( cp , jarNames ) ; if ( null != classpathJars ) h . put ( FOUNDCLASSES + "java.class.path" , classpathJars ) ; // Also check for JDK 1.2+ type classpaths String othercp = System . getProperty ( "sun.boot.class.path" ) ; if ( null != othercp ) { h . put ( "sun.boot.class.path" , othercp ) ; classpathJars = checkPathForJars ( othercp , jarNames ) ; if ( null != classpathJars ) h . put ( FOUNDCLASSES + "sun.boot.class.path" , classpathJars ) ; } //@todo NOTE: We don't actually search java.ext.dirs for // *.jar files therein! This should be updated othercp = System . getProperty ( "java.ext.dirs" ) ; if ( null != othercp ) { h . put ( "java.ext.dirs" , othercp ) ; classpathJars = checkPathForJars ( othercp , jarNames ) ; if ( null != classpathJars ) h . put ( FOUNDCLASSES + "java.ext.dirs" , classpathJars ) ; } //@todo also check other System properties' paths? // v2 = checkPathForJars(System.getProperty("sun.boot.library.path"), jarNames); // ?? may not be needed // v3 = checkPathForJars(System.getProperty("java.library.path"), jarNames); // ?? may not be needed } catch ( SecurityException se2 ) { // For applet context, etc. h . put ( "java.class.path" , "WARNING: SecurityException thrown accessing system classpath properties" ) ; } }
Fillin hash with info about SystemProperties .