mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8189102: All tools should support -?, -h and --help
Reviewed-by: kvn, jjg, weijun, alanb, rfield, ksrini
This commit is contained in:
parent
1655b15477
commit
22762d1cdc
59 changed files with 680 additions and 152 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, 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
|
||||
|
@ -162,11 +162,12 @@ class Driver {
|
|||
engProps.put((String) me.getKey(), (String) me.getValue());
|
||||
}
|
||||
} else if ("--version".equals(state)) {
|
||||
System.out.println(MessageFormat.format(RESOURCE.getString(DriverResource.VERSION), Driver.class.getName(), "1.31, 07/05/05"));
|
||||
System.out.println(MessageFormat.format(RESOURCE.getString(DriverResource.VERSION),
|
||||
Driver.class.getName(), "1.31, 07/05/05"));
|
||||
return;
|
||||
} else if ("--help".equals(state)) {
|
||||
printUsage(doPack, true, System.out);
|
||||
System.exit(1);
|
||||
System.exit(0);
|
||||
return;
|
||||
} else {
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, 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
|
||||
|
@ -89,7 +89,7 @@ public class DriverResource extends ListResourceBundle {
|
|||
" -q, --quiet set verbosity to lowest level",
|
||||
" -l{F}, --log-file={F} output to the given log file, ",
|
||||
" or '-' for System.out",
|
||||
" -?, -h, --help print this message",
|
||||
" -?, -h, --help print this help message",
|
||||
" -V, --version print program version",
|
||||
" -J{X} pass option X to underlying Java VM",
|
||||
"",
|
||||
|
@ -118,7 +118,7 @@ public class DriverResource extends ListResourceBundle {
|
|||
" -q, --quiet set verbosity to lowest level",
|
||||
" -l{F}, --log-file={F} output to the given log file, or",
|
||||
" '-' for System.out",
|
||||
" -?, -h, --help print this message",
|
||||
" -?, -h, --help print this help message",
|
||||
" -V, --version print program version",
|
||||
" -J{X} pass option X to underlying Java VM"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue