8009843: sjavac should accept -cp as synonym for -classpath

Reviewed-by: jjg
This commit is contained in:
Fredrik Öhrström 2013-03-11 19:03:35 -07:00
parent 41447ec765
commit 454b9ff071

View File

@ -443,7 +443,7 @@ public class Main {
out[source_path+1] = out[source_path+1]+File.pathSeparatorChar+args[i+1];
i++;
}
} else if (args[i].equals("-classpath")) {
} else if (args[i].equals("-classpath") || args[i].equals("-cp")) {
if (class_path == -1) {
class_path = j;
out[j] = args[i];
@ -663,6 +663,7 @@ public class Main {
o.equals("-d") ||
o.equals("-sourcepath") ||
o.equals("-classpath") ||
o.equals("-cp") ||
o.equals("-bootclasspath") ||
o.equals("-src");
}
@ -953,7 +954,8 @@ public class Main {
if (args[i].equals("-src") ||
args[i].equals("-sourcepath") ||
args[i].equals("-modulepath") ||
args[i].equals("-classpath"))
args[i].equals("-classpath") ||
args[i].equals("-cp"))
{
// Reset the includes,excludes and excludefiles after they have been used.
includes = new LinkedList<String>();