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

using "Con" as a class name causes a problem (reserved filename in Win32)

XMLWordPrintable

    • generic, x86
    • generic, windows_nt, windows_xp

      Name: tb29552 Date: 11/16/98


      /*

      This might be known already. But I couldn't find in the
      bug search. If one use the word "Con" as a name for a
      class, the JDK compiler produces the byte code, and
      dumps to the screen, instead of creating a file
      "Con.class". Appearantly, it misinterprets the class
      name as Console or something.

      */
      class Con {
          public static void outputMessage() {
      System.out.println("java.version = " +
      System.getProperty("java.version"));
      System.out.println("Operating System Name = " +
      System.getProperty("os.name"));
      System.out.println("Operating system architecture = " +
      System.getProperty("os.arch"));
      System.out.println("Operating system version = " +
      System.getProperty("os.version") + "\n");
          }

          public static void main(String[] args) {
      outputMessage();
          }
      }

      (Review ID: 42799)
      ======================================================================

            jjg Jonathan Gibbons
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: