提交 85c00ade 编写于 作者: V vromero

8009924: some langtools tools do not accept -cp as an alias for -classpath

Reviewed-by: jjg
上级 758bed5d
......@@ -467,7 +467,7 @@ public abstract class Configuration {
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")) {
......
......@@ -187,6 +187,8 @@ public class DocLint implements Plugin {
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)) {
......
......@@ -109,7 +109,7 @@ Options:\n\
\ 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\
......
/*
* 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 @@ public enum ToolOption {
}
},
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) {
......
......@@ -39,6 +39,7 @@ main.usage=Usage: javadoc [options] [packagenames] [sourcefiles] [@files]\n\
\ -docletpath <path> Specify where to find doclet class files\n\
\ -sourcepath <pathlist> Specify where to find source files\n\
\ -classpath <pathlist> Specify where to find user class files\n\
\ -cp <pathlist> Specify where to find user class files\n\
\ -exclude <pkglist> Specify a list of packages to exclude\n\
\ -subpackages <subpkglist> Specify subpackages to recursively load\n\
\ -breakiterator Compute first sentence with BreakIterator\n\
......
......@@ -531,7 +531,7 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask {
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;
......
#
# 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 @@ where [options] include:\n\
\n\t\
-help Print this help message and exit\n\t\
-classpath <path> Path from which to load classes\n\t\
-cp <path> Path from which to load classes\n\t\
-bootclasspath <path> Path from which to load bootstrap classes\n\t\
-d <dir> Output directory\n\t\
-o <file> Output file (only one of -d or -o may be used)\n\t\
......@@ -108,6 +109,8 @@ main.opt.force=\
\ -force Always write output files
main.opt.classpath=\
\ -classpath <path> Path from which to load classes
main.opt.cp=\
\ -cp <path> Path from which to load classes
main.opt.bootclasspath=\
\ -bootclasspath <path> Path from which to load bootstrap classes
main.usage.foot=\
......
......@@ -885,7 +885,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
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;
......
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.s=\
main.opt.classpath=\
\ -classpath <path> Specify where to find user class files
main.opt.cp=\
\ -cp <path> Specify where to find user class files
main.opt.bootclasspath=\
\ -bootclasspath <path> Override location of bootstrap class files
......
......@@ -36,7 +36,7 @@ Options:
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册