< prev index next >

src/java.base/share/classes/sun/launcher/LauncherHelper.java

Print this page
rev 47480 : [mq]: 8176841


 251         }
 252         String[] values = value.split(System.getProperty("path.separator"));
 253         boolean first = true;
 254         for (String s : values) {
 255             if (first) { // first line treated specially
 256                 ostream.println(s);
 257                 first = false;
 258             } else { // following lines prefix with indents
 259                 ostream.println(INDENT + INDENT + s);
 260             }
 261         }
 262     }
 263 
 264     /*
 265      * prints the locale subopt/section
 266      */
 267     private static void printLocale() {
 268         Locale locale = Locale.getDefault();
 269         ostream.println(LOCALE_SETTINGS);
 270         ostream.println(INDENT + "default locale = " +
 271                 locale.getDisplayLanguage());
 272         ostream.println(INDENT + "default display locale = " +
 273                 Locale.getDefault(Category.DISPLAY).getDisplayName());
 274         ostream.println(INDENT + "default format locale = " +
 275                 Locale.getDefault(Category.FORMAT).getDisplayName());
 276         printLocales();
 277         ostream.println();
 278     }
 279 
 280     private static void printLocales() {
 281         Locale[] tlocales = Locale.getAvailableLocales();
 282         final int len = tlocales == null ? 0 : tlocales.length;
 283         if (len < 1 ) {
 284             return;
 285         }
 286         // Locale does not implement Comparable so we convert it to String
 287         // and sort it for pretty printing.
 288         Set<String> sortedSet = new TreeSet<>();
 289         for (Locale l : tlocales) {
 290             sortedSet.add(l.toString());
 291         }




 251         }
 252         String[] values = value.split(System.getProperty("path.separator"));
 253         boolean first = true;
 254         for (String s : values) {
 255             if (first) { // first line treated specially
 256                 ostream.println(s);
 257                 first = false;
 258             } else { // following lines prefix with indents
 259                 ostream.println(INDENT + INDENT + s);
 260             }
 261         }
 262     }
 263 
 264     /*
 265      * prints the locale subopt/section
 266      */
 267     private static void printLocale() {
 268         Locale locale = Locale.getDefault();
 269         ostream.println(LOCALE_SETTINGS);
 270         ostream.println(INDENT + "default locale = " +
 271                 locale.getDisplayName());
 272         ostream.println(INDENT + "default display locale = " +
 273                 Locale.getDefault(Category.DISPLAY).getDisplayName());
 274         ostream.println(INDENT + "default format locale = " +
 275                 Locale.getDefault(Category.FORMAT).getDisplayName());
 276         printLocales();
 277         ostream.println();
 278     }
 279 
 280     private static void printLocales() {
 281         Locale[] tlocales = Locale.getAvailableLocales();
 282         final int len = tlocales == null ? 0 : tlocales.length;
 283         if (len < 1 ) {
 284             return;
 285         }
 286         // Locale does not implement Comparable so we convert it to String
 287         // and sort it for pretty printing.
 288         Set<String> sortedSet = new TreeSet<>();
 289         for (Locale l : tlocales) {
 290             sortedSet.add(l.toString());
 291         }


< prev index next >