--- /dev/null
+public class HelloWorld {
+
+ public static void main (String[] args) throws Exception {
+ System.out.println("Hello World!");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+<!-- ajc-ant script, not to be used from Ant commant line - see AntSpec -->
+<project name="ltw">
+
+ <!-- using this we can debug the forked VM -->
+ <property
+ name="jdwp"
+ value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>
+
+ <target name="JDK14 LTW">
+ <java fork="yes" classname="HelloWorld" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <classpath>
+ <pathelement path="${aj.sandbox}/hello.jar"/>
+ </classpath>
+ <jvmarg value="-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader"/>
+ <!--
+-->
+ <jvmarg value="-Daj.class.path=${aj.sandbox}/hello.jar"/>
+ <jvmarg value="-Dorg.aspectj.tracing.debug=true"/>
+ <!-- use META-INF/aop.xml style -->
+<!-- <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>-->
+<!-- <jvmarg line="${jdwp}"/>-->
+ </java>
+ </target>
+
+</project>
runTest("Odd zip on classpath");
}
+ public void testJDK14LTW() {
+ runTest("JDK14 LTW");
+ }
+
// separate bugzilla patch has this one... commented out
// public void testSeparateCompilationDeclareParentsCall() {
// runTest("Separate compilation with ltw: declare parents and call");
</run>
</ajc-test>
-->
+ <ajc-test dir="ltw" title="JDK14 LTW" keywords="ltw">
+ <compile
+ files="HelloWorld.java"
+ options="-outjar hello.jar"
+ />
+ <ant file="ant.xml" target="JDK14 LTW" verbose="true"/>
+ </ajc-test>
private static int maxOpenArchives = -1;
private static final int MAXOPEN_DEFAULT = 1000;
- private static Trace trace = TraceFactory.getTraceFactory().getTrace(ClassPathManager.class);
+ /*
+ * FIXME maw Tracing ClassPathManager can cause recursion for JDK 1.4
+ * LTW i.e. -Djava.system.class.loader
+ */
+// private static Trace trace = TraceFactory.getTraceFactory().getTrace(ClassPathManager.class);
static {
String openzipsString = getSystemPropertyWithoutSecurityException("org.aspectj.weaver.openarchives",Integer.toString(MAXOPEN_DEFAULT));
public ClassPathManager(List classpath, IMessageHandler handler) {
- if (trace.isTraceEnabled()) trace.enter("<init>",this,new Object[] { classpath, handler });
+// if (trace.isTraceEnabled()) trace.enter("<init>",this,new Object[] { classpath, handler });
entries = new ArrayList();
for (Iterator i = classpath.iterator(); i.hasNext();) {
String name = (String) i.next();
addPath(name, handler);
}
- if (trace.isTraceEnabled()) trace.exit("<init>");
+// if (trace.isTraceEnabled()) trace.exit("<init>");
}
protected ClassPathManager() {};