Reading file attributes using java

I am trying to read some basic attributes of a file, i.e. readable files, records, etc. I forbid my head by reading a java tutorial. It seems pretty easy only my eclipse does not recognize any interfaces / methods that are in the tutorial .

Also I found this File Class, which also does not work. I am using ubuntu but could not tell which version of the JDK I am using. Also, I have not seen anywhere in the documentation that these methods are new. Any ideas on why I can't use them?

+3
source share
2 answers

Java 6 ( ), canRead(), canWrite() canExecute(). File.

, , JDK7, ( .) , , , , !a >

UPDATE: , , Java 7.

+3

java -version, java.io. * stuff. , bash (http://ubuntuforums.org/archive/index.php/t-319735.html) , .

0

All Articles