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

File.length() reports a length of 0 for special files hiberfil.sys and pagefile.sys (win)

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b73
    • CPU:
      x86
    • OS:
      windows_xp

      Backports

        Description

        J2SE Version (please include all output from java -version flag):
         1.6.0-b59


        Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
         No.


        Operating System Configuration Information (be specific):
         Windows XP Service Pack 2
         Hibernation enabled
         Virtual memory enabled


        Bug Description:
          java.io.File reports a length of 0 for the special
         Windows files C:\hiberfil.sys and C:\pagefile.sys




        Steps to Reproduce (be specific):
          Create java.io.File instances for the hibernation file
          "C:\hiberfil.sys" and the paging file "C:\pagefile.sys".
          Check the file length using File#length().

        Here's source code to reproduce the problem:

        public class FileBug {

             public static void main(String[] args) {
                 java.io.File hiberfil = new java.io.File("C:\\hiberfil.sys");
                 java.io.File pageFile = new java.io.File("C:\\pagefile.sys");

                 System.out.println("hiberfil.sys length=" + hiberfil.length());
                 System.out.println("pagefile.sys length=" + pageFile.length());
             }

        }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sherman Xueming Shen
                Reporter:
                tyao Ting-Yun Ingrid Yao (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: