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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 02:50:32  来源:igfitidea点击:

Where is java.nio.file

javaimportnio

提问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.fileis 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 所带来的不快感所困扰。