I need to access a Windows system file that resides within one of my virtual Windows 7 machines. (hiberfil.sys). The virtual drive is mapped within Windows and can be browsed. However, Java reports that access is denied using any kind of inputstream.
I'm assuming that this is due to NTFS permissions on the file and as such I will either need to take ownership of the file, or remove the NTFS permissions altogether.
I've had a quick play about with both 'takeown' and 'icacls' from within Windows but I can't seem to get the syntax correct.
Can anyone suggest a way of gaining access to the file? My immediate thought was to call either takeown or icacls from Java to remove the permissions, but I'm not sure if this is the best route.
Any suggestions would be greatly appreciated.
Thanks.
I'm not sure if this helps, but have you tried with the new file system API of Java SE 7?
http://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/package-summary.html
http://docs.oracle.com/javase/7/docs/api/java/nio/file/package-summary.html