diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassPath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassPath.java index ac4745ea97f..1c89a1049c9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassPath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassPath.java @@ -151,18 +151,17 @@ public class ClassPath implements Serializable { } /** Checks for class path components in the following properties: - * "java.class.path", "sun.boot.class.path", "java.ext.dirs" + * "java.class.path", "sun.boot.class.path" * * @return class path as used by default by BCEL */ public static final String getClassPath() { - String class_path, boot_path, ext_path; + String class_path, boot_path; try { class_path = SecuritySupport.getSystemProperty("java.class.path"); boot_path = SecuritySupport.getSystemProperty("sun.boot.class.path"); - ext_path = SecuritySupport.getSystemProperty("java.ext.dirs"); } catch (SecurityException e) { return ""; @@ -173,23 +172,6 @@ public class ClassPath implements Serializable { getPathComponents(class_path, list); getPathComponents(boot_path, list); - ArrayList dirs = new ArrayList(); - getPathComponents(ext_path, dirs); - - for(Iterator e = dirs.iterator(); e.hasNext(); ) { - File ext_dir = new File((String)e.next()); - String[] extensions = SecuritySupport.getFileList(ext_dir, new FilenameFilter() { - public boolean accept(File dir, String name) { - name = name.toLowerCase(); - return name.endsWith(".zip") || name.endsWith(".jar"); - } - }); - - if(extensions != null) - for(int i=0; i < extensions.length; i++) - list.add(ext_path + File.separatorChar + extensions[i]); - } - StringBuffer buf = new StringBuffer(); for(Iterator e = list.iterator(); e.hasNext(); ) { diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java index e581f9a5b40..71570d68d08 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java @@ -243,6 +243,9 @@ public final class SecuritySupport { if (protocol.equalsIgnoreCase("jar")) { String path = url.getPath(); protocol = path.substring(0, path.indexOf(":")); + } else if (protocol.equalsIgnoreCase("jrt")) { + // if the systemId is "jrt" then allow access if "file" allowed + protocol = "file"; } } @@ -278,7 +281,7 @@ public final class SecuritySupport { /** * Read JAXP system property in this order: system property, - * $java.home/lib/jaxp.properties if the system property is not specified + * $java.home/conf/jaxp.properties if the system property is not specified * * @param propertyId the Id of the property * @return the value of the property @@ -292,7 +295,7 @@ public final class SecuritySupport { } /** - * Read from $java.home/lib/jaxp.properties for the specified property + * Read from $java.home/conf/jaxp.properties for the specified property * The program * * @param propertyId the Id of the property @@ -306,7 +309,7 @@ public final class SecuritySupport { synchronized (cacheProps) { if (firstTime) { String configFile = getSystemProperty("java.home") + File.separator + - "lib" + File.separator + "jaxp.properties"; + "conf" + File.separator + "jaxp.properties"; File f = new File(configFile); if (getFileExists(f)) { is = getFileInputStream(f); @@ -332,12 +335,12 @@ public final class SecuritySupport { } /** - * Cache for properties in java.home/lib/jaxp.properties + * Cache for properties in java.home/conf/jaxp.properties */ static final Properties cacheProps = new Properties(); /** - * Flag indicating if the program has tried reading java.home/lib/jaxp.properties + * Flag indicating if the program has tried reading java.home/conf/jaxp.properties */ static volatile boolean firstTime = true; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java index a6b99891be4..6696d64447c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java @@ -558,9 +558,6 @@ public class EnvironmentCheck * Logs java.class.path and other likely paths; then attempts * to search those paths for .jar files with Xalan-related classes. * - * //@todo NOTE: We don't actually search java.ext.dirs for - * // *.jar files therein! This should be updated - * * @param h Hashtable to put information in * @see #jarNames * @see #checkPathForJars(String, String[]) @@ -615,20 +612,6 @@ public class EnvironmentCheck 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 = SecuritySupport.getSystemProperty("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 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java index aa993a299c5..a9baeac29ef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java @@ -41,7 +41,7 @@ import javax.xml.datatype.XMLGregorianCalendar; * Any Exception thrown during the instantiation process is wrapped as a {@link DatatypeConfigurationException}. * *
Object
.
+ * If the file ${JAVA_HOME}/conf/jaxp.properties exists, it is loaded in a {@link java.util.Properties} Object
.
* The Properties
Object
is then queried for the property as documented in the prior step
* and processed as documented in the prior step.
* - * ${JAVA_HOME}/lib/jaxp.properties: This configuration file is in standard + * ${JAVA_HOME}/conf/jaxp.properties: This configuration file is in standard * {@link java.util.Properties} format. If the file exists and the system property is specified, * its value will be used to override the default of the property. *
@@ -314,7 +314,7 @@ public final class XMLConstants { * * *- * ${JAVA_HOME}/lib/jaxp.properties: This configuration file is in standard + * ${JAVA_HOME}/conf/jaxp.properties: This configuration file is in standard * java.util.Properties format. If the file exists and the system property is specified, * its value will be used to override the default of the property. * @@ -380,7 +380,7 @@ public final class XMLConstants { *
* *- * ${JAVA_HOME}/lib/jaxp.properties: This configuration file is in standard + * ${JAVA_HOME}/conf/jaxp.properties: This configuration file is in standard * java.util.Properties format. If the file exists and the system property is specified, * its value will be used to override the default of the property. * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java index 0a96c5760ef..de6050ac4e8 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java @@ -43,7 +43,7 @@ import java.util.regex.Pattern; * Any Exception thrown during the instantiation process is wrapped as a {@link DatatypeConfigurationException}. * *
Object
.
+ * If the file ${JAVA_HOME}/conf/jaxp.properties exists, it is loaded in a {@link java.util.Properties} Object
.
* The Properties
Object
is then queried for the property as documented in the prior step
* and processed as documented in the prior step.
* java.util.Properties
*
format and contains the fully qualified name of the
* implementation class with the key being the system property defined
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/FactoryFinder.java b/jaxp/src/java.xml/share/classes/javax/xml/parsers/FactoryFinder.java
index 9e186f512ef..e17b4dd147c 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/FactoryFinder.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/FactoryFinder.java
@@ -50,12 +50,12 @@ class FactoryFinder {
private static boolean debug = false;
/**
- * Cache for properties in java.home/lib/jaxp.properties
+ * Cache for properties in java.home/conf/jaxp.properties
*/
private static final Properties cacheProps = new Properties();
/**
- * Flag indicating if properties from java.home/lib/jaxp.properties
+ * Flag indicating if properties from java.home/conf/jaxp.properties
* have been cached.
*/
static volatile boolean firstTime = true;
@@ -236,13 +236,13 @@ class FactoryFinder {
if (debug) se.printStackTrace();
}
- // try to read from $java.home/lib/jaxp.properties
+ // try to read from $java.home/conf/jaxp.properties
try {
if (firstTime) {
synchronized (cacheProps) {
if (firstTime) {
String configFile = ss.getSystemProperty("java.home") + File.separator +
- "lib" + File.separator + "jaxp.properties";
+ "conf" + File.separator + "jaxp.properties";
File f = new File(configFile);
firstTime = false;
if (ss.doesFileExist(f)) {
@@ -255,7 +255,7 @@ class FactoryFinder {
final String factoryClassName = cacheProps.getProperty(factoryId);
if (factoryClassName != null) {
- dPrint("found in $java.home/jaxp.properties, value=" + factoryClassName);
+ dPrint("found in ${java.home}/conf/jaxp.properties, value=" + factoryClassName);
return newInstance(type, factoryClassName, null, true);
}
}
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java
index 7de367e702e..f2e9120a02f 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java
@@ -70,7 +70,7 @@ public abstract class SAXParserFactory {
* property.
* java.util.Properties
*
format and contains the fully qualified name of the
* implementation class with the key being the system property defined
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java
index f34d0f8bda1..c9c4a08dc43 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java
@@ -51,12 +51,12 @@ class FactoryFinder {
private static boolean debug = false;
/**
- * Cache for properties in java.home/lib/jaxp.properties
+ * Cache for properties in java.home/conf/jaxp.properties
*/
final private static Properties cacheProps = new Properties();
/**
- * Flag indicating if properties from java.home/lib/jaxp.properties
+ * Flag indicating if properties from java.home/conf/jaxp.properties
* have been cached.
*/
private static volatile boolean firstTime = true;
@@ -271,7 +271,7 @@ class FactoryFinder {
}
// Try read $java.home/lib/stax.properties followed by
- // $java.home/lib/jaxp.properties if former not present
+ // $java.home/conf/jaxp.properties if former not present
String configFile = null;
try {
if (firstTime) {
@@ -287,7 +287,7 @@ class FactoryFinder {
}
else {
configFile = ss.getSystemProperty("java.home") + File.separator +
- "lib" + File.separator + "jaxp.properties";
+ "conf" + File.separator + "jaxp.properties";
f = new File(configFile);
if (ss.doesFileExist(f)) {
dPrint("Read properties file "+f);
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java
index 4ae6568aa57..25772307027 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java
@@ -53,12 +53,12 @@ class FactoryFinder {
private static boolean debug = false;
/**
- * Cache for properties in java.home/lib/jaxp.properties
+ * Cache for properties in java.home/conf/jaxp.properties
*/
private final static Properties cacheProps = new Properties();
/**
- * Flag indicating if properties from java.home/lib/jaxp.properties
+ * Flag indicating if properties from java.home/conf/jaxp.properties
* have been cached.
*/
static volatile boolean firstTime = true;
@@ -268,13 +268,13 @@ class FactoryFinder {
if (debug) se.printStackTrace();
}
- // try to read from $java.home/lib/jaxp.properties
+ // try to read from $java.home/conf/jaxp.properties
try {
if (firstTime) {
synchronized (cacheProps) {
if (firstTime) {
String configFile = ss.getSystemProperty("java.home") + File.separator +
- "lib" + File.separator + "jaxp.properties";
+ "conf" + File.separator + "jaxp.properties";
File f = new File(configFile);
firstTime = false;
if (ss.doesFileExist(f)) {
@@ -287,7 +287,7 @@ class FactoryFinder {
final String factoryClassName = cacheProps.getProperty(factoryId);
if (factoryClassName != null) {
- dPrint("found in $java.home/jaxp.properties, value=" + factoryClassName);
+ dPrint("found in ${java.home}/conf/jaxp.properties, value=" + factoryClassName);
return newInstance(type, factoryClassName, null, true, true);
}
}
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java
index cde66def0ea..846cda11048 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java
@@ -62,7 +62,7 @@ public abstract class TransformerFactory {
* property.
* java.util.Properties
*
format and contains the fully qualified name of the
* implementation class with the key being the system property defined
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java
index 2701b1908f4..527c6c73a02 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java
@@ -141,7 +141,7 @@ public abstract class SchemaFactory {
* and returns it if it is successfully created.
* $java.home/lib/jaxp.properties
is read and
+ * $java.home/conf/jaxp.properties
is read and
* the value associated with the key being the system property above
* is looked for. If present, the value is processed just like above.
*