File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes package java.nio.file does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "package java.nio.file does not exist" Watch "package java.nio.file does not exist" New topic

package java.nio.file does not exist

ravi manik

Joined: Jul 01, 2010
Posts: 3
whenever i compile my code, i get this error : package java.nio.file does not exist
im using jdk1.6.0_14..

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15083

Welcome to JavaRanch.

That package indeed does not exist on Java 6. Where did you find this; are you looking at API documentation for JDK 7, which is not yet released?

You can look at the API documentation for JDK 6 online here:

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
ravi manik

Joined: Jul 01, 2010
Posts: 3
i found it while i was studying i\o from the sun java tutorials:

if its not yet released yet, i wonder why have they given in the beginners tutorial.

can any one suggest another source for studying i\o and file handling.
David Newton

Joined: Sep 29, 2008
Posts: 12617

Sun wrote:This section is being updated to reflect features and conventions of the upcoming release, JDK7. You can download the current JDK7 Snapshot from We've published this preliminary version so you can get the most current information now, and so you can tell us about errors, omissions, or improvements we can make to this tutorial.

And there's a link on the same page regarding mapping to JDK7 from earlier releases:
I agree. Here's the link:
subject: package java.nio.file does not exist
jQuery in Action, 3rd edition