I have the following code:
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
public class debugImageMain {
public static void main() throws IOException {
Path path = Paths.get("path/to/file");
byte[] data = Files.readAllBytes(path);
}
}
But when I run I get:
Exception in thread "main" java.lang.NoSuchMethodException: pdc.conversor.debugImageMain.main([Ljava.lang.String;) at java.lang.Class.getMethod(Class.java:1786)
javac -version gives: javac 1.8.0_60 and I have java VERSION 8 Update 91.
IntelliJ tell me java.nio.file imports are underlined in red and says "Usages of API which isn't available at the configured language level.
Any help please???