author | herrick |
Wed, 12 Dec 2018 08:27:16 -0500 | |
branch | JDK-8200758-branch |
changeset 57071 | 94e9270166f0 |
parent 57059 | 9bb2a4dc3af7 |
child 57106 | ea870b9ce89a |
permissions | -rw-r--r-- |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
1 |
/* |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
4 |
* |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
10 |
* |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
15 |
* accompanied this code). |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
16 |
* |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
20 |
* |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
23 |
* questions. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
24 |
*/ |
56982
e094d5483bd6
8212048: Cleanup source code and fix issues discussed in preliminary review
herrick
parents:
56933
diff
changeset
|
25 |
|
57039 | 26 |
package jdk.jpackage.internal; |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
27 |
|
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
28 |
import java.util.ResourceBundle; |
57025 | 29 |
import java.io.File; |
30 |
import java.text.MessageFormat; |
|
31 |
||
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
32 |
|
56994
b4aca2dbe2b5
8212537: Create method and class description comments for main functionality
herrick
parents:
56982
diff
changeset
|
33 |
/** |
b4aca2dbe2b5
8212537: Create method and class description comments for main functionality
herrick
parents:
56982
diff
changeset
|
34 |
* CLIHelp |
b4aca2dbe2b5
8212537: Create method and class description comments for main functionality
herrick
parents:
56982
diff
changeset
|
35 |
* |
b4aca2dbe2b5
8212537: Create method and class description comments for main functionality
herrick
parents:
56982
diff
changeset
|
36 |
* Generate and show the command line interface help message(s). |
b4aca2dbe2b5
8212537: Create method and class description comments for main functionality
herrick
parents:
56982
diff
changeset
|
37 |
*/ |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
38 |
public class CLIHelp { |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
39 |
|
56869
41e17fe9fbeb
8208522: removed unreferenced class and minor formatting of java source
herrick
parents:
56821
diff
changeset
|
40 |
private static final ResourceBundle I18N = ResourceBundle.getBundle( |
57059 | 41 |
"jdk.jpackage.internal.resources.HelpResources"); |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
42 |
|
57039 | 43 |
// generates --help for jpackage's CLI |
57022
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
44 |
public static void showHelp(boolean noArgs) { |
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
45 |
|
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
46 |
Platform platform = Platform.getPlatform(); |
57022
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
47 |
if (noArgs) { |
57025 | 48 |
Log.info(MessageFormat.format( |
49 |
I18N.getString("MSG_Help_no_args"), File.pathSeparator)); |
|
57022
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
50 |
} else { |
57025 | 51 |
Log.info(MessageFormat.format( |
52 |
I18N.getString("MSG_Help_common"), File.pathSeparator)); |
|
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
53 |
|
57022
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
54 |
switch (platform) { |
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
55 |
case MAC: |
56933
9f59eeb3cc0f
8211182: Remove jdk.packager.services.UserJvmOptionsService
herrick
parents:
56869
diff
changeset
|
56 |
Log.info(I18N.getString("MSG_Help_mac")); |
57071 | 57 |
if (Log.isDebug()) { |
58 |
Log.info(I18N.getString("MSG_Help_win")); |
|
59 |
Log.info(I18N.getString("MSG_Help_linux")); |
|
60 |
} |
|
57022
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
61 |
break; |
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
62 |
case LINUX: |
57071 | 63 |
Log.info(I18N.getString("MSG_Help_linux")); |
64 |
if (Log.isDebug()) { |
|
65 |
Log.info(I18N.getString("MSG_Help_win")); |
|
66 |
Log.info(I18N.getString("MSG_Help_mac")); |
|
67 |
} |
|
57022
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
68 |
break; |
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
69 |
case WINDOWS: |
57071 | 70 |
Log.info(I18N.getString("MSG_Help_win")); |
71 |
if (Log.isDebug()) { |
|
72 |
Log.info(I18N.getString("MSG_Help_mac")); |
|
73 |
Log.info(I18N.getString("MSG_Help_linux")); |
|
74 |
} |
|
57022
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
75 |
break; |
81021f910bc2
8213333: Fix issues found in jpackager with automated tests
herrick
parents:
57017
diff
changeset
|
76 |
} |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
77 |
} |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
78 |
} |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
79 |
} |