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

System property "line.separator" is different CMD vs instantiation from C++

    XMLWordPrintable

Details

    • x86_64
    • windows

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows (any)

      A DESCRIPTION OF THE PROBLEM :
      When calling java program from CMD line, i.e. java xxx.class, the line.separator system property is 0x0D 0x0A
      If java is instantiated from C++ (JNI Instantiation API), the line.separator property is 0x0D 0x0D 0x0A


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Can be reproduced on Java 8 and 11. Did not check latest.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expect line.separator to be consistent

      FREQUENCY : always


      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: