vmargs ="";
}
try {
+ if (mp.indexOf("$runtimemodule") != -1) {
+ mp = mp.replace(mp.indexOf("$runtimemodule"),"$runtimemodule".length(),TestUtil.aspectjrtPath(true).toString());
+ }
if (mp.indexOf("$runtime") != -1) {
mp = mp.replace(mp.indexOf("$runtime"),"$runtime".length(),TestUtil.aspectjrtPath().toString());
}
if (-1 == cpIndex) {
String[] newargs = new String[args.length + 2];
newargs[0] = "-classpath";
- newargs[1] = TestUtil.aspectjrtPath().getPath();
+ newargs[1] = TestUtil.aspectjrtPath(false).getPath();
System.arraycopy(args, 0, newargs, 2, args.length);
args = newargs;
cpIndex = 1;
private static final Properties LIB_RPATHS;
private static final Map LIB_ENTRIES;
private static File ASPECTJRT_PATH;
+ private static File ASPECTJRTJAR_PATH;
static {
{
- String[] paths = { "sp:aspectjrt.path", "sp:aspectjrt.jar"
- ,"../lib/test/aspectjrt.jar", "../runtime/target/classes"
-// ,"../aj-build/jars/aspectj5rt-all.jar", "../aj-build/jars/runtime.jar", "../runtime/bin"
- };
+ String[] paths = {
+ "sp:aspectjrt.path",
+ "sp:aspectjrt.jar",
+ "../runtime/target/classes",
+ "../lib/test/aspectjrt.jar"};
ASPECTJRT_PATH = FileUtil.getBestFile(paths);
+ ASPECTJRTJAR_PATH = FileUtil.getBestFile(paths, true);
}
{
boolean j5 = false;
return ASPECTJRT_PATH;
}
+ // needsJar for module packaged runtime
+ public static File aspectjrtPath(boolean needsJar) {
+ if (needsJar) {
+ return ASPECTJRTJAR_PATH;
+ } else {
+ return ASPECTJRT_PATH;
+ }
+ }
+
public static URL fileToURL(File file) {
try {
return file.toURL();