Skip to content

Commit b7d4cb0

Browse files
author
mgricken
committed
Seems to work; not going to use descriptors for standard Sun/Apple/OpenJDK. Still need to test PathClassLoader with more than one .jar file as path to help with Habanero Java.
git-svn-id: file:///tmp/test-svn/branches/drjava-compilers@5316 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent 8dbb396 commit b7d4cb0

File tree

15 files changed

+133
-157
lines changed

15 files changed

+133
-157
lines changed

drjava/lib/platform.jar

-2.9 KB
Binary file not shown.

drjava/src/edu/rice/cs/drjava/model/JDKToolsLibrary.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -191,21 +191,21 @@ public static Iterable<JDKToolsLibrary> makeFromRuntime(GlobalModel model) {
191191
list.add(new JDKToolsLibrary(version, null, compiler, debugger, javadoc));
192192
}
193193

194-
if (JavaVersion.JAVA_6.compareTo(version.majorVersion())>=0) {
195-
// at least Java 6, try Eclipse compiler
196-
msg(" at least Java 6, try EclipseCompiler");
197-
// provide "UNKNOWN 6.0" as version
198-
FullVersion eclipseVersion = JavaVersion.parseFullVersion(JavaVersion.JAVA_6.fullVersion().versionString(),
199-
"Eclipse","");
200-
msg(" version for Eclipse: "+eclipseVersion);
201-
compiler = getCompilerInterface("edu.rice.cs.drjava.model.compiler.EclipseCompiler", eclipseVersion);
202-
msg(" compiler="+compiler.getClass().getName());
203-
if (compiler!=NoCompilerAvailable.ONLY) {
204-
// if we have found a compiler, add it
205-
msg(" compiler found");
206-
list.add(new JDKToolsLibrary(eclipseVersion, null, compiler, debugger, javadoc));
207-
}
208-
}
194+
// if (JavaVersion.JAVA_6.compareTo(version.majorVersion())>=0) {
195+
// // at least Java 6, try Eclipse compiler
196+
// msg(" at least Java 6, try EclipseCompiler");
197+
// // provide "UNKNOWN 6.0" as version
198+
// FullVersion eclipseVersion = JavaVersion.parseFullVersion(JavaVersion.JAVA_6.fullVersion().versionString(),
199+
// "Eclipse","");
200+
// msg(" version for Eclipse: "+eclipseVersion);
201+
// compiler = getCompilerInterface("edu.rice.cs.drjava.model.compiler.EclipseCompiler", eclipseVersion);
202+
// msg(" compiler="+compiler.getClass().getName());
203+
// if (compiler!=NoCompilerAvailable.ONLY) {
204+
// // if we have found a compiler, add it
205+
// msg(" compiler found");
206+
// list.add(new JDKToolsLibrary(eclipseVersion, null, compiler, debugger, javadoc));
207+
// }
208+
// }
209209
msg(" compilers found: "+list.size());
210210

211211
if (list.size()==0) {

drjava/src/edu/rice/cs/drjava/model/JarJDKToolsLibrary.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,6 @@ public class JarJDKToolsLibrary extends JDKToolsLibrary {
111111
"com.sun.xml.internal.rngom",
112112
"com.sun.xml.internal.xsom",
113113
"org.relaxng",
114-
//
115-
// // Mint:
116-
// "com.sun.tools.javac",
117-
// "com.sun.tools.javac.tree",
118-
// "com.sun.tools.javac.comp",
119-
// "com.sun.tools.javac.main",
120-
// "edu.rice.cs.mint",
121-
// "edu.rice.cs.mint.comp",
122-
// "edu.rice.cs.mint.runtime",
123-
// "edu.rice.cs.mint.runtime.mspTree"
124114
});
125115
}
126116

@@ -203,7 +193,7 @@ else if (f.getName().equals("tools.jar")) {
203193
File[] jars = IOUtil.attemptListFiles(libDir, IOUtil.extensionFilePredicate("jar"));
204194
if (jars != null) { bootClassPath.addAll(Arrays.asList(jars)); }
205195
}
206-
bootClassPath.addAll(additionalBootClassPath);
196+
if (additionalBootClassPath!=null) { bootClassPath.addAll(additionalBootClassPath); }
207197
if (bootClassPath.isEmpty()) { bootClassPath = null; } // null defers to the compiler's default behavior
208198

209199
try {
@@ -455,8 +445,7 @@ public static Iterable<JarJDKToolsLibrary> search(GlobalModel model) {
455445
if (lib.isValid()) {
456446
FullVersion v = lib.version();
457447
Map<FullVersion, Iterable<JarJDKToolsLibrary>> mapToAddTo = results;
458-
if (v.vendor().equals(JavaVersion.VendorType.UNKNOWN) ||
459-
((desc!=null)&&(desc.isCompound()))) { mapToAddTo = compoundResults; }
448+
if ((desc!=null)&&(desc.isCompound())) { mapToAddTo = compoundResults; }
460449

461450
if (mapToAddTo.containsKey(v)) { mapToAddTo.put(v, IterUtil.compose(lib, mapToAddTo.get(v))); }
462451
else { mapToAddTo.put(v, IterUtil.singleton(lib)); }

platform/build.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,12 @@
10291029
<property name="nextgen-tools-1" location="${nextgen-home}/nextgen2.jar" />
10301030
<available property="nextgen-tools" value="${nextgen-tools-1}" file="${nextgen-tools-1}" />
10311031

1032+
<property name="nextgen-tools-2" location="${nextgen-home}/jars/nextgen2.jar" />
1033+
<available property="nextgen-tools" value="${nextgen-tools-2}" file="${nextgen-tools-2}" />
1034+
1035+
<property name="nextgen-tools-3" location="${nextgen-home}/built" />
1036+
<available property="nextgen-tools" value="${nextgen-tools-3}" file="${nextgen-tools-3}/edu/rice/cs/nextgen2/compiler/Main.class" />
1037+
10321038
<fail message="Can't find nextgen2.jar in the Nextgen home: ${nextgen-home}" unless="nextgen-tools" />
10331039
</target>
10341040

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)