changeset 1624:fbb6e470079d

8009843: sjavac should accept -cp as synonym for -classpath Reviewed-by: jjg
author ohrstrom
date Mon, 11 Mar 2013 19:03:35 -0700
parents d0ae21e3a382
children 7fe9b9d29095
files src/share/classes/com/sun/tools/sjavac/Main.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/sjavac/Main.java	Mon Mar 11 10:02:55 2013 -0700
+++ b/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>();