aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authormkersten <mkersten>2003-07-29 10:53:53 +0000
committermkersten <mkersten>2003-07-29 10:53:53 +0000
commitb2d927ffc0ab5e8066c5b97309d0a347a8aa5f1f (patch)
tree5398d449ca2fcfcafa197a16a0ae1e93f10f1b12 /org.aspectj.ajdt.core
parent579a6d779f41e89318e5549657058d9008857863 (diff)
downloadaspectj-b2d927ffc0ab5e8066c5b97309d0a347a8aa5f1f.tar.gz
aspectj-b2d927ffc0ab5e8066c5b97309d0a347a8aa5f1f.zip
This problem occurred when a command line compile did not specify a "-classpath" option. In that case BuildArgParser loaded System.getProperty("java.class.path"). However, in the launch script aspectjtools.jar is already added to the VM's classpath. We remove all occurrences of "aspectjtools.jar" from the detected classpath. This should enable bootstrapping ajc.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java25
1 files changed, 17 insertions, 8 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
index bcc220888..cd87517e4 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
@@ -222,32 +222,41 @@ public class BuildArgParser extends Main {
}
+ /**
+ * If the classpath is not set, we use the environment's java.class.path, but remove
+ * the aspectjtools.jar entry from that list in order to prevent wierd bootstrap issues
+ * (refer to bug#39959).
+ */
public List getClasspath(AjcConfigParser parser) {
List ret = new ArrayList();
if (parser.bootclasspath == null) {
addClasspath(System.getProperty("sun.boot.class.path", ""), ret);
- } else {
+ } else {
addClasspath(parser.bootclasspath, ret);
}
String extdirs = parser.extdirs;
if (extdirs == null) {
extdirs = System.getProperty("java.ext.dirs", "");
- }
+ }
addExtDirs(extdirs, ret);
-
- if (parser.classpath == null) {
- //??? this puts the compiler's classes on the classpath
- //??? this is ajc-1.0 compatible
+
+ if (parser.classpath == null) {
addClasspath(System.getProperty("java.class.path", ""), ret);
+ List fixedList = new ArrayList();
+ for (Iterator it = ret.iterator(); it.hasNext(); ) {
+ String entry = (String)it.next();
+ if (!entry.endsWith("aspectjtools.jar")) {
+ fixedList.add(entry);
+ }
+ }
+ ret = fixedList;
} else {
addClasspath(parser.classpath, ret);
}
-
//??? eclipse seems to put outdir on the classpath
//??? we're brave and believe we don't need it
-
return ret;
}