diff options
author | aclement <aclement> | 2005-11-15 16:55:56 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-15 16:55:56 +0000 |
commit | 4ea00513761eeb32b3403caa1a3ba39f9218a839 (patch) | |
tree | c573d4ba824e54558736bfa42cb23cde6e91efcd /build/src | |
parent | ba1ff19cc794b2f6d2e0b95f3f80bf13093fd5b4 (diff) | |
download | aspectj-4ea00513761eeb32b3403caa1a3ba39f9218a839.tar.gz aspectj-4ea00513761eeb32b3403caa1a3ba39f9218a839.zip |
matthews fixes for 95517
Diffstat (limited to 'build/src')
-rw-r--r-- | build/src/$installer$/org/aspectj/Main.java | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/build/src/$installer$/org/aspectj/Main.java b/build/src/$installer$/org/aspectj/Main.java index 65ba9be5a..073b8a792 100644 --- a/build/src/$installer$/org/aspectj/Main.java +++ b/build/src/$installer$/org/aspectj/Main.java @@ -705,7 +705,7 @@ class InstallContext { } public boolean onUnix() { - return !onMacintosh() && !onWindows(); + return !onWindows(); } static final String[] TEXT_EXTENSIONS = { @@ -1347,7 +1347,8 @@ class InstallPane extends WizardPane { // Moved to the bin dir in 1.2.1 // we should now come back and make the generation of this // script uniform with those above. - lsm.writeAJLaunchScript(); + lsm.writeAJLaunchScript("aj",false); + lsm.writeAJLaunchScript("aj5",true); } if (hasGui()) { progressBar.setValue(100); @@ -1517,8 +1518,7 @@ class LaunchScriptMaker { /** * */ - public void writeAJLaunchScript() throws IOException { - String name = "aj"; + public void writeAJLaunchScript(String name, boolean isJava5) throws IOException { if (!context.onUnix()) { if (context.onOS2()) { name += ".cmd"; @@ -1532,7 +1532,7 @@ class LaunchScriptMaker { File file = new File(destDir, name); PrintStream ps = getPrintStream(file); - writeAJLaunchScriptContent(ps); + writeAJLaunchScriptContent(ps,isJava5); ps.close(); if (context.onUnix()) { @@ -1543,14 +1543,16 @@ class LaunchScriptMaker { /** * @param ps */ - private void writeAJLaunchScriptContent(PrintStream ps) { + private void writeAJLaunchScriptContent(PrintStream ps, boolean isJava5) { if (context.onUnix()) { writeUnixHeader(ps); - writeAJUnixLaunchLine(ps); + if (isJava5) writeAJ5UnixLaunchLine(ps); + else writeAJUnixLaunchLine(ps); } else { writeWindowsHeader(ps); - writeAJWindowsLaunchLine(ps); + if (isJava5) writeAJ5WindowsLaunchLine(ps); + else writeAJWindowsLaunchLine(ps); } } @@ -1561,7 +1563,7 @@ class LaunchScriptMaker { ps.println( "\"%JAVA_HOME%\\bin\\java\" -classpath " + "\"%ASPECTJ_HOME%\\lib\\aspectjweaver.jar\"" + - " \"-Djava.system.class.loader=org.aspectj.weaver.WeavingURLClassLoader\"" + + " \"-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader\"" + " \"-Daj.class.path=%ASPECTPATH%;%CLASSPATH%\"" + " \"-Daj.aspect.path=%ASPECTPATH%\"" + " " + makeScriptArgs(false)); @@ -1570,17 +1572,40 @@ class LaunchScriptMaker { /** * @param ps */ + private void writeAJ5WindowsLaunchLine(PrintStream ps) { + ps.println( + "\"%JAVA_HOME%\\bin\\java\" -classpath " + + "\"%ASPECTJ_HOME%\\lib\\aspectjweaver.jar;%CLASSPATH%\"" + + " \"-javaagent:%ASPECTJ_HOME%\\lib\\aspectjweaver.jar\"" + + " " + makeScriptArgs(false)); + } + + /** + * @param ps + */ private void writeAJUnixLaunchLine(PrintStream ps) { ps.println( "\"$JAVA_HOME/bin/java\" -classpath" + " \"$ASPECTJ_HOME/lib/aspectjweaver.jar\"" + - " \"-Djava.system.class.loader=org.aspectj.weaver.WeavingURLClassLoader\"" + + " \"-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader\"" + " \"-Daj.class.path=$ASPECTPATH:$CLASSPATH\"" + " \"-Daj.aspect.path=$ASPECTPATH\"" + " " + makeScriptArgs(true)); } + /** + * @param ps + */ + private void writeAJ5UnixLaunchLine(PrintStream ps) { + ps.println( + "\"$JAVA_HOME/bin/java\" -classpath" + + " \"$ASPECTJ_HOME/lib/aspectjweaver.jar:$CLASSPATH\"" + + " \"-javaagent:$ASPECTJ_HOME/lib/aspectjweaver.jar\"" + + " " + + makeScriptArgs(true)); + } + private void writeWindowsHeader(PrintStream ps) { ps.println("@echo off"); ps.println("REM This file generated by AspectJ installer"); |