src/jdk.rmic/share/classes/sun/tools/javac/BatchEnvironment.java
Print this page
*** 158,178 ****
* Factory
*/
static BatchEnvironment create(OutputStream out,
String srcPathString,
String classPathString,
! String sysClassPathString,
! String extDirsString){
ClassPath[] classPaths = classPaths(srcPathString, classPathString,
! sysClassPathString, extDirsString);
return new BatchEnvironment(out, classPaths[0], classPaths[1]);
}
protected static ClassPath[] classPaths(String srcPathString,
String classPathString,
! String sysClassPathString,
! String extDirsString) {
// Create our source classpath and our binary classpath
ClassPath sourcePath;
ClassPath binaryPath;
StringBuffer binaryPathBuffer = new StringBuffer();
--- 158,176 ----
* Factory
*/
static BatchEnvironment create(OutputStream out,
String srcPathString,
String classPathString,
! String sysClassPathString) {
ClassPath[] classPaths = classPaths(srcPathString, classPathString,
! sysClassPathString);
return new BatchEnvironment(out, classPaths[0], classPaths[1]);
}
protected static ClassPath[] classPaths(String srcPathString,
String classPathString,
! String sysClassPathString) {
// Create our source classpath and our binary classpath
ClassPath sourcePath;
ClassPath binaryPath;
StringBuffer binaryPathBuffer = new StringBuffer();
*** 194,227 ****
sysClassPathString = classPathString;
}
}
appendPath(binaryPathBuffer, sysClassPathString);
- if (extDirsString == null) {
- extDirsString = System.getProperty("java.ext.dirs");
- }
- if (extDirsString != null) {
- StringTokenizer st = new StringTokenizer(extDirsString,
- File.pathSeparator);
- while (st.hasMoreTokens()) {
- String dirName = st.nextToken();
- File dir = new File(dirName);
- if (!dirName.endsWith(File.separator)) {
- dirName += File.separator;
- }
- if (dir.isDirectory()) {
- String[] files = dir.list();
- for (int i = 0; i < files.length; ++i) {
- String name = files[i];
- if (name.endsWith(".jar")) {
- appendPath(binaryPathBuffer, dirName + name);
- }
- }
- }
- }
- }
-
appendPath(binaryPathBuffer, classPathString);
sourcePath = new ClassPath(srcPathString);
binaryPath = new ClassPath(binaryPathBuffer.toString());
--- 192,201 ----
*** 716,726 ****
return;
}
// Couldn't find the source, try the one mentioned in the binary
if (bc.getSource() != null) {
! srcfile = new ClassFile(new File((String)bc.getSource()));
// Look for the source file
srcfile = pkg.getSourceFile(srcfile.getName());
if ((srcfile != null) && srcfile.exists()) {
if (tracing)
dtEvent("loadDefinition: FILENAME IN BINARY " +
--- 690,700 ----
return;
}
// Couldn't find the source, try the one mentioned in the binary
if (bc.getSource() != null) {
! srcfile = ClassFile.newClassFile(new File((String)bc.getSource()));
// Look for the source file
srcfile = pkg.getSourceFile(srcfile.getName());
if ((srcfile != null) && srcfile.exists()) {
if (tracing)
dtEvent("loadDefinition: FILENAME IN BINARY " +
*** 861,871 ****
if (tracing)
dtEvent("loadDefinition: IO EXCEPTION (package)");
}
if (srcfile == null) {
String fn = (String)c.getClassDefinition().getSource();
! srcfile = new ClassFile(new File(fn));
}
} else {
// Get a source file name from the package
Identifier nm = c.getName();
try {
--- 835,845 ----
if (tracing)
dtEvent("loadDefinition: IO EXCEPTION (package)");
}
if (srcfile == null) {
String fn = (String)c.getClassDefinition().getSource();
! srcfile = ClassFile.newClassFile(new File(fn));
}
} else {
// Get a source file name from the package
Identifier nm = c.getName();
try {