java.nio.file 在哪里
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2034427/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is java.nio.file
提问by Nick
I am reading java documentation that tells me there should be a java.nio.file namespace. But when I attempt to import it the precompiler is complaining that it doesn't exist.
我正在阅读 java 文档,它告诉我应该有一个 java.nio.file 命名空间。但是当我尝试导入它时,预编译器抱怨它不存在。
What's up?
这是怎么回事?
采纳答案by skaffman
java.nio.file
is coming in Java 7. It's not in Java 6 or before.
java.nio.file
即将在 Java 7 中出现。它不在 Java 6 或更早版本中。
You must be reading the JDK7 docs.
您必须阅读JDK7 文档。
Until then, you're stuck with the steaming heap of unpleasantness that is java.io.File.
在那之前,您会被java.io.File 所带来的不快感所困扰。