Eclipse: “The import java.io cannot be resolved”

检查一下选项:

重点看jdk的绑定

43down voteaccepted

Check your Eclipse preferences: Java -> Installed JREs. The one that you're using should be marked and it should be a JDK not just a JRE. Also check your project's build path: Right click on the project -> Properties -> Java Build Path Check in the "libraries" folder whether the JRE System Library is present and if not add it using "Add library"->"JRE System Library" and then select the correct one (from an installed JDK).

原文地址:https://www.cnblogs.com/qqhfeng/p/5430101.html