Amol Patil Amol Patil - 2 months ago 23
Java Question

java.nio.file.Path cannot be resolved. It is indirectly referenced from required .class files

I have added package 'squareup.okhttp' and got above error. Really don't know what it mean.

following is the code and the error giving by eclipse in problems tab.

@Override
public Source source(File file) throws FileNotFoundException {
return Okio.source(file);
}


java.nio.file.OpenOption cannot be resolved. It is indirectly referenced from required .class files FileSystem.java /myapp/src/com/squareup/okhttp/internal/io


I am using JDK 1.6. Added source code of okhttp2.5.0.jar in my code instead of jar.

Please help me to sort out this.

Answer Source

I am using JDK 1.6

The java.nio.file package was only introduced in Java 7.