java.io.File has several issues that can not be fixed easily without breaking backward compatibility. So in Java 7, a whole new package java.nio.file and in particular the class java.nio.file.Path was introduced to supersede java.io.File. At the time of the writing (May 2017), we still see people introducing java.io.File in new code, so we should help developers to migrate to java.nio.file.Path by deprecating java.io.File. see http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-May/047847.html