8009843: sjavac should accept -cp as synonym for -classpath
authorohrstrom
Mon, 11 Mar 2013 19:03:35 -0700
changeset 16338 7d42d41478e6
parent 16337 181ac468ab24
child 16339 0bc89752353d
8009843: sjavac should accept -cp as synonym for -classpath Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/sjavac/Main.java
--- a/langtools/src/share/classes/com/sun/tools/sjavac/Main.java	Mon Mar 11 10:02:55 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/sjavac/Main.java	Mon Mar 11 19:03:35 2013 -0700
@@ -443,7 +443,7 @@
                     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 @@
                o.equals("-d") ||
                o.equals("-sourcepath") ||
                o.equals("-classpath") ||
+               o.equals("-cp") ||
                o.equals("-bootclasspath") ||
                o.equals("-src");
     }
@@ -953,7 +954,8 @@
             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>();