Im trying to listen to a directory for changes, then discovered java.nio.* was developed to handle efficiently such tasks and more. Then downloaded jdk1.7.0_02 from oracle and started eclipse with it. Then created new java project, tryed to implement some class from java.nio.file and Oh my eyes! "The import java.nio.file cannot be resolved". Do i have to find some .jar in the whole jdk1.7.0_02 directory that contains such package? or is something wrong with my classpath? Thank you in advance!!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You've different version of JDKs. You just need to set JDK7/JRE7
version eclipse project. You may also select the Execution environment JRE
to JavaSE 7 while creating a new project.
The JDK your projects use to compile, the version of the resulting class files, the JRE they used to execute and the JDK eclipse runs with are widely independent settings.
回答2:
The New I/0 is named as the NIO in javaSE 7.0 ("Dolphin").
The below link described as in details.
wiki - NIO