< prev index next >

src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java

Print this page




  31 
  32 
  33 /**
  34  * CLIHelp
  35  *
  36  * Generate and show the command line interface help message(s).
  37  */
  38 public class CLIHelp {
  39 
  40     private static final ResourceBundle I18N = ResourceBundle.getBundle(
  41             "jdk.jpackage.internal.resources.HelpResources");
  42 
  43     // generates --help for jpackage's CLI
  44     public static void showHelp(boolean noArgs) {
  45 
  46         Platform platform = Platform.getPlatform();
  47         if (noArgs) {
  48             Log.info(MessageFormat.format(
  49                      I18N.getString("MSG_Help_no_args"), File.pathSeparator));
  50         } else {
  51             Log.info(MessageFormat.format(
  52                     I18N.getString("MSG_Help_common"), File.pathSeparator));

















  53 
  54             switch (platform) {
  55                 case MAC:
  56                     Log.info(I18N.getString("MSG_Help_mac"));
  57                     if (Log.isDebug()) {
  58                         Log.info(I18N.getString("MSG_Help_win"));
  59                         Log.info(I18N.getString("MSG_Help_linux"));
  60                     }
  61                     break;
  62                 case LINUX:
  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                     }
  68                     break;
  69                 case WINDOWS:
  70                     Log.info(I18N.getString("MSG_Help_win"));
  71                     if (Log.isDebug()) {
  72                         Log.info(I18N.getString("MSG_Help_mac"));


  31 
  32 
  33 /**
  34  * CLIHelp
  35  *
  36  * Generate and show the command line interface help message(s).
  37  */
  38 public class CLIHelp {
  39 
  40     private static final ResourceBundle I18N = ResourceBundle.getBundle(
  41             "jdk.jpackage.internal.resources.HelpResources");
  42 
  43     // generates --help for jpackage's CLI
  44     public static void showHelp(boolean noArgs) {
  45 
  46         Platform platform = Platform.getPlatform();
  47         if (noArgs) {
  48             Log.info(MessageFormat.format(
  49                      I18N.getString("MSG_Help_no_args"), File.pathSeparator));
  50         } else {
  51             String types = null;
  52             if (Log.isDebug()) {
  53                 types  =
  54                     "\"exe\", \"msi\", \"rpm\", \"deb\", \"pkg\", and \"dmg\"";
  55             } else {
  56                 switch (platform) {
  57                     case MAC:
  58                         types = "\"pkg\" and \"dmg\"";
  59                         break;
  60                     case LINUX:
  61                         types = "\"rpm\" and \"deb\"";
  62                         break;
  63                     case WINDOWS:
  64                         types = "\"exe\" and \"msi\"";
  65                         break;
  66                 }
  67             }
  68             Log.info(MessageFormat.format(I18N.getString("MSG_Help_common"),
  69                     File.pathSeparator, types));
  70 
  71             switch (platform) {
  72                 case MAC:
  73                     Log.info(I18N.getString("MSG_Help_mac"));
  74                     if (Log.isDebug()) {
  75                         Log.info(I18N.getString("MSG_Help_win"));
  76                         Log.info(I18N.getString("MSG_Help_linux"));
  77                     }
  78                     break;
  79                 case LINUX:
  80                     Log.info(I18N.getString("MSG_Help_linux"));
  81                     if (Log.isDebug()) {
  82                         Log.info(I18N.getString("MSG_Help_win"));
  83                         Log.info(I18N.getString("MSG_Help_mac"));
  84                     }
  85                     break;
  86                 case WINDOWS:
  87                     Log.info(I18N.getString("MSG_Help_win"));
  88                     if (Log.isDebug()) {
  89                         Log.info(I18N.getString("MSG_Help_mac"));
< prev index next >