I have just installed Java 7 and begun to look at the Java 7 NIO.2.
According to many different tutorials there are some differences to the official JDK7.
Interface FileRef is not in JDK7
References to path.copyTo, but method does not exist. Must instead use Files.copy
References to a class called Attributes, but does not exist. BasicFileAttributes basic = Attributes.readBasicFileAttributes. Must instead use Files.getFileAttributeView.
Are those tutorials based on some earlier draft version of NIO2? There might have been some changes between the time when those tutorials were written and the official release of Java 7.
Some (all?) of Oracle's tutorials have been updated to the new Java 7 standards, for example the File I/O tutorial. I'd expect those to be up-to-date with the final Java 7 release.
Sverre Moe
Ranch Hand
Joined: Jul 10, 2007
Posts: 109
posted
0
Jesper de Jong wrote:Some (all?) of Oracle's tutorials have been updated to the new Java 7 standards, for example the File I/O tutorial. I'd expect those to be up-to-date with the final Java 7 release.
I have just gone through Oracle's tutorial on Java 7 NIO.2 and they are updated to conform with the official JDK7.