File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java 7 Confusion

 
Sverre Moe
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Pie
    Posts: 15150
    31
    Android IntelliJ IDE Java Scala Spring
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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.
     
    Sverre Moe
    Ranch Hand
    Posts: 110
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Pie
    Posts: 15150
    31
    Android IntelliJ IDE Java Scala Spring
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 110
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic