Reputation: 83755
Why this line doesn't work?
import static java.nio.file.AccessMode.*;
Eclipse says:
The import java.nio.file cannot be resolved
Here is the whole program so far:
import static java.nio.file.AccessMode.*;
public class CheckFileAccessibility {
public static void main(String[] args) {
}
}
I am following the official Java tutorial here: http://java.sun.com/docs/books/tutorial/essential/io/check.html
Upvotes: 3
Views: 4724
Reputation: 39753
Look at the superordinate chapter. It says:
This section is being updated to reflect features and conventions of the upcoming release, JDK7. You can download the current JDK7 Snapshot from java.net. We've published this preliminary version so you can get the most current information now, and so you can tell us about errors, omissions, or improvements we can make to this tutorial.
So it's about java 7.
Upvotes: 6