8219475: javap man page needs to be updated
Reviewed-by: mchung
This commit is contained in:
parent
b75d37538d
commit
9d7777e585
src/jdk.jdeps/share/classes/com/sun/tools/javap
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2020, 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
|
||||
@ -326,6 +326,20 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
|
||||
void process(JavapTask task, String opt, String arg) throws BadArgs {
|
||||
task.options.moduleName = arg;
|
||||
}
|
||||
},
|
||||
|
||||
// this option is processed by the launcher, and cannot be used when invoked via
|
||||
// an API like ToolProvider. It exists here to be documented in the command-line help.
|
||||
new Option(false, "-J") {
|
||||
@Override
|
||||
boolean matches(String opt) {
|
||||
return opt.startsWith("-J");
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(JavapTask task, String opt, String arg) throws BadArgs {
|
||||
throw task.new BadArgs("err.only.for.launcher");
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@ -936,7 +950,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
|
||||
printLines(getMessage("main.usage", progname));
|
||||
for (Option o: recognizedOptions) {
|
||||
String name = o.aliases[0].replaceAll("^-+", "").replaceAll("-+", "_"); // there must always be at least one name
|
||||
if (name.startsWith("X") || name.equals("fullversion") || name.equals("h") || name.equals("verify"))
|
||||
if (name.startsWith("X") || name.equals("fullversion"))
|
||||
continue;
|
||||
printLines(getMessage("main.opt." + name));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2010, 2020, 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
|
||||
@ -45,6 +45,7 @@ err.bad.innerclasses.attribute=bad InnerClasses attribute for {0}
|
||||
err.nomem=Insufficient memory. To increase memory use -J-Xmx option.
|
||||
err.cant.find.module=Cannot find module {0}
|
||||
err.cant.find.module.ex=Problem finding module {0}: {1}
|
||||
err.only.for.launcher=This option can only be used when invoking javap from the command-line launcher.
|
||||
|
||||
main.usage.summary=\
|
||||
Usage: {0} <options> <classes>\n\
|
||||
@ -55,17 +56,13 @@ warn.unexpected.class=File {0} does not contain class {1}
|
||||
|
||||
note.prefix=Note:
|
||||
|
||||
main.usage.summary=\
|
||||
Usage: {0} <options> <classes>\n\
|
||||
use --help for a list of possible options
|
||||
|
||||
main.usage=\
|
||||
Usage: {0} <options> <classes>\n\
|
||||
where possible options include:
|
||||
|
||||
|
||||
main.opt.help=\
|
||||
\ -? -h --help -help Print this help message
|
||||
\ --help -help -h -? Print this help message
|
||||
|
||||
main.opt.version=\
|
||||
\ -version Version information
|
||||
@ -129,6 +126,9 @@ main.opt.sysinfo=\
|
||||
main.opt.module=\
|
||||
\ --module <module>, -m <module> Specify module containing classes to be disassembled
|
||||
|
||||
main.opt.J=\
|
||||
\ -J<vm-option> Specify a VM option
|
||||
|
||||
main.usage.foot=\n\
|
||||
GNU-style options may use '=' instead of whitespace to separate the name of an option\n\
|
||||
from its value.\n\
|
||||
|
Loading…
x
Reference in New Issue
Block a user