I am getting the error "cannot find symbol" on "Path", "FIles", etc. I am using javac and java 1.8.0_20 on Mac OS X 10.9.2 and the Terminal. Thanks.
import java.io.*;
import java.nio.*;
class a{
public static void main(String args[]) throws IOException{
Path directorio = "/Users/Josue/Desktop/";
try {
DirectoryStream<Path> stream = Files.newDirectoryStream(dir);
for( Path file: stream ){
System.out.println(file.getFileName());
}
}
catch ( DirectoryIteratorException x ){
System.err.println(x);
}
}
}