United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6348207 File.length() reports a length of 0 for special files hiberfil.sys and pagefile.sys (win)
JDK-6348207 : File.length() reports a length of 0 for special files hiberfil.sys and pagefile.sys (win)

Details
Type:
Bug
Submit Date:
2005-11-09
Status:
Resolved
Updated Date:
2010-05-11
Project Name:
JDK
Resolved Date:
2006-02-18
Component:
core-libs
OS:
windows_xp
Sub-Component:
java.io
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:

Sub Tasks

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());
     }

}

                                    

Comments
EVALUATION

regression, need to address in mustang
                                     
2006-01-14



Hardware and Software, Engineered to Work Together