Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4026970

The localized message can't be shown on the command line.

    XMLWordPrintable

Details

    • 1.1fcs
    • generic
    • generic
    • Not verified

    Description

      The localized message can't be shown on the command line.
      The following code in Main.java and BatchEnvironment.java seems to cause
      the problem.

          /**
           * Output a string. This can either be an error message or something
           * for debugging. This should be used instead of println.
           */
          public void output(String msg) {
              try {
                  int len = msg.length();
                  for (int i = 0 ; i < len ; i++) {
                      out.write(msg.charAt(i));
                  }
                  out.write('\n');
              } catch (IOException e) {
              }
          }

      This method is used as printing waring, error and usage messages on
      the command line.
      In the above code, higher byte in unicode is removed and only lower byte
      in unicode is sent to output stream because of using OutputStream.write()
      method. I don't know why println() can't be used which is mentioned
      in the comment field.
      If println() can't be used, Write.write() method should be used instead.

      Attachments

        Activity

          People

            nishimur Naoyuki Ishimura (Inactive)
            kuno Koji Uno
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: