equal
deleted
inserted
replaced
21 * $Id: EnvironmentCheck.java,v 1.2.4.1 2005/09/09 07:13:59 pvedula Exp $ |
21 * $Id: EnvironmentCheck.java,v 1.2.4.1 2005/09/09 07:13:59 pvedula Exp $ |
22 */ |
22 */ |
23 package com.sun.org.apache.xalan.internal.xslt; |
23 package com.sun.org.apache.xalan.internal.xslt; |
24 |
24 |
25 import com.sun.org.apache.xalan.internal.utils.ObjectFactory; |
25 import com.sun.org.apache.xalan.internal.utils.ObjectFactory; |
|
26 import com.sun.org.apache.xalan.internal.utils.SecuritySupport; |
26 |
27 |
27 import java.io.File; |
28 import java.io.File; |
28 import java.io.FileWriter; |
29 import java.io.FileWriter; |
29 import java.io.PrintWriter; |
30 import java.io.PrintWriter; |
30 import java.lang.reflect.Field; |
31 import java.lang.reflect.Field; |
572 h = new Hashtable(); |
573 h = new Hashtable(); |
573 |
574 |
574 // Grab java version for later use |
575 // Grab java version for later use |
575 try |
576 try |
576 { |
577 { |
577 String javaVersion = System.getProperty("java.version"); |
578 String javaVersion = SecuritySupport.getSystemProperty("java.version"); |
578 |
579 |
579 h.put("java.version", javaVersion); |
580 h.put("java.version", javaVersion); |
580 } |
581 } |
581 catch (SecurityException se) |
582 catch (SecurityException se) |
582 { |
583 { |
591 // Do this in order |
592 // Do this in order |
592 try |
593 try |
593 { |
594 { |
594 |
595 |
595 // This is present in all JVM's |
596 // This is present in all JVM's |
596 String cp = System.getProperty("java.class.path"); |
597 String cp = SecuritySupport.getSystemProperty("java.class.path"); |
597 |
598 |
598 h.put("java.class.path", cp); |
599 h.put("java.class.path", cp); |
599 |
600 |
600 Vector classpathJars = checkPathForJars(cp, jarNames); |
601 Vector classpathJars = checkPathForJars(cp, jarNames); |
601 |
602 |
602 if (null != classpathJars) |
603 if (null != classpathJars) |
603 h.put(FOUNDCLASSES + "java.class.path", classpathJars); |
604 h.put(FOUNDCLASSES + "java.class.path", classpathJars); |
604 |
605 |
605 // Also check for JDK 1.2+ type classpaths |
606 // Also check for JDK 1.2+ type classpaths |
606 String othercp = System.getProperty("sun.boot.class.path"); |
607 String othercp = SecuritySupport.getSystemProperty("sun.boot.class.path"); |
607 |
608 |
608 if (null != othercp) |
609 if (null != othercp) |
609 { |
610 { |
610 h.put("sun.boot.class.path", othercp); |
611 h.put("sun.boot.class.path", othercp); |
611 |
612 |
615 h.put(FOUNDCLASSES + "sun.boot.class.path", classpathJars); |
616 h.put(FOUNDCLASSES + "sun.boot.class.path", classpathJars); |
616 } |
617 } |
617 |
618 |
618 //@todo NOTE: We don't actually search java.ext.dirs for |
619 //@todo NOTE: We don't actually search java.ext.dirs for |
619 // *.jar files therein! This should be updated |
620 // *.jar files therein! This should be updated |
620 othercp = System.getProperty("java.ext.dirs"); |
621 othercp = SecuritySupport.getSystemProperty("java.ext.dirs"); |
621 |
622 |
622 if (null != othercp) |
623 if (null != othercp) |
623 { |
624 { |
624 h.put("java.ext.dirs", othercp); |
625 h.put("java.ext.dirs", othercp); |
625 |
626 |