JDK-8181098 : Deprecate java.io.File or some of its individual methods
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.io
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2017-05-25
  • Updated: 2017-05-25
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