aspose file tools*
The moose likes Features new in Java 7 and the fly likes Java 7 Confusion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Features new in Java 7
Bookmark "Java 7 Confusion" Watch "Java 7 Confusion" New topic
Author

Java 7 Confusion

Sverre Moe
Ranch Hand

Joined: Jul 10, 2007
Posts: 110
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.


  • Jesper de Jong
    Java Cowboy
    Saloon Keeper

    Joined: Aug 16, 2005
    Posts: 14156
        
      19

    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.


    Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
    Scala Notes - My blog about Scala
    Sverre Moe
    Ranch Hand

    Joined: Jul 10, 2007
    Posts: 110
    Al tutorials I have come across are a bit seasoned. So it might be that they are a little bit outdated.
    Jesper de Jong
    Java Cowboy
    Saloon Keeper

    Joined: Aug 16, 2005
    Posts: 14156
        
      19

    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: 110
    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.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Java 7 Confusion