# HG changeset patch # User vromero # Date 1372930533 -3600 # Node ID 0eab5f5e3d1d2dbcc8344e009bd4a35f86ed7f83 # Parent 1d6d1be0a94f59a6a69bbe0301ed66f327da28ee 8009924: some langtools tools do not accept -cp as an alias for -classpath Reviewed-by: jjg diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java --- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Thu Jul 04 10:35:33 2013 +0100 @@ -467,7 +467,7 @@ nodeprecated = true; } else if (opt.equals("-sourcepath")) { sourcepath = os[1]; - } else if (opt.equals("-classpath") && + } else if ((opt.equals("-classpath") || opt.equals("-cp")) && sourcepath.length() == 0) { sourcepath = os[1]; } else if (opt.equals("-excludedocfilessubdir")) { diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/doclint/DocLint.java --- a/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java Thu Jul 04 10:35:33 2013 +0100 @@ -187,6 +187,8 @@ javacBootClassPath = splitPath(args[++i]); } else if (arg.equals("-classpath") && i + 1 < args.length) { javacClassPath = splitPath(args[++i]); + } else if (arg.equals("-cp") && i + 1 < args.length) { + javacClassPath = splitPath(args[++i]); } else if (arg.equals("-sourcepath") && i + 1 < args.length) { javacSourcePath = splitPath(args[++i]); } else if (arg.equals(XMSGS_OPTION)) { diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/doclint/resources/doclint.properties --- a/langtools/src/share/classes/com/sun/tools/doclint/resources/doclint.properties Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/doclint/resources/doclint.properties Thu Jul 04 10:35:33 2013 +0100 @@ -109,7 +109,7 @@ \ Show this message.\n\ \n\ The following javac options are also supported\n\ -\ -bootclasspath, -classpath, -sourcepath, -Xmaxerrs, -Xmaxwarns\n\ +\ -bootclasspath, -classpath, -cp, -sourcepath, -Xmaxerrs, -Xmaxwarns\n\ \n\ To run doclint on part of a project, put the compiled classes for your\n\ project on the classpath (or bootclasspath), then specify the source files\n\ diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/javadoc/ToolOption.java --- a/langtools/src/share/classes/com/sun/tools/javadoc/ToolOption.java Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/javadoc/ToolOption.java Thu Jul 04 10:35:33 2013 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,13 @@ } }, + CP("-cp", true) { + @Override + public void process(Helper helper, String arg) { + helper.setCompilerOpt(opt, arg); + } + }, + EXTDIRS("-extdirs", true) { @Override public void process(Helper helper, String arg) { diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties --- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties Thu Jul 04 10:35:33 2013 +0100 @@ -39,6 +39,7 @@ \ -docletpath Specify where to find doclet class files\n\ \ -sourcepath Specify where to find source files\n\ \ -classpath Specify where to find user class files\n\ +\ -cp Specify where to find user class files\n\ \ -exclude Specify a list of packages to exclude\n\ \ -subpackages Specify subpackages to recursively load\n\ \ -breakiterator Compute first sentence with BreakIterator\n\ diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/javah/JavahTask.java --- a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java Thu Jul 04 10:35:33 2013 +0100 @@ -531,7 +531,7 @@ String name = o.aliases[0].substring(1); // there must always be at least one name log.println(getMessage("main.opt." + name)); } - String[] fmOptions = { "-classpath", "-bootclasspath" }; + String[] fmOptions = { "-classpath", "-cp", "-bootclasspath" }; for (String o: fmOptions) { if (fileManager.isSupportedOption(o) == -1) continue; diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties --- a/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties Thu Jul 04 10:35:33 2013 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -77,6 +77,7 @@ \n\t\ -help Print this help message and exit\n\t\ -classpath Path from which to load classes\n\t\ +-cp Path from which to load classes\n\t\ -bootclasspath Path from which to load bootstrap classes\n\t\ -d Output directory\n\t\ -o Output file (only one of -d or -o may be used)\n\t\ @@ -108,6 +109,8 @@ \ -force Always write output files main.opt.classpath=\ \ -classpath Path from which to load classes +main.opt.cp=\ +\ -cp Path from which to load classes main.opt.bootclasspath=\ \ -bootclasspath Path from which to load bootstrap classes main.usage.foot=\ diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/javap/JavapTask.java --- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Thu Jul 04 10:35:33 2013 +0100 @@ -885,7 +885,7 @@ continue; log.println(getMessage("main.opt." + name)); } - String[] fmOptions = { "-classpath", "-bootclasspath" }; + String[] fmOptions = { "-classpath", "-cp", "-bootclasspath" }; for (String o: fmOptions) { if (fileManager.isSupportedOption(o) == -1) continue; diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties --- a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Thu Jul 04 10:35:33 2013 +0100 @@ -1,5 +1,5 @@ -err.prefix=Error: +err.prefix=Error: err.bad.constant.pool=error while reading constant pool for {0}: {1} err.class.not.found=class not found: {0} @@ -73,6 +73,9 @@ main.opt.classpath=\ \ -classpath Specify where to find user class files +main.opt.cp=\ +\ -cp Specify where to find user class files + main.opt.bootclasspath=\ \ -bootclasspath Override location of bootstrap class files diff -r 1d6d1be0a94f -r 0eab5f5e3d1d langtools/test/tools/doclint/tool/HelpTest.out --- a/langtools/test/tools/doclint/tool/HelpTest.out Tue Jul 02 22:49:40 2013 +0100 +++ b/langtools/test/tools/doclint/tool/HelpTest.out Thu Jul 04 10:35:33 2013 +0100 @@ -36,7 +36,7 @@ Show this message. The following javac options are also supported - -bootclasspath, -classpath, -sourcepath, -Xmaxerrs, -Xmaxwarns + -bootclasspath, -classpath, -cp, -sourcepath, -Xmaxerrs, -Xmaxwarns To run doclint on part of a project, put the compiled classes for your project on the classpath (or bootclasspath), then specify the source files