I am using jdk 7. I want to use nio package in my program but when I am trying to import java.nio.file.* , I am getting a error that java.nio.file package does not exist !
Asked
Active
Viewed 109 times
1 Answers
0
I expect that your Eclipse project is configured to build against an older Java profile.
If you are using Maven then you need to set the required Java version in the POM file.
Otherwise, this Answer gives instructions for setting a project's target Java version.
I am trying to compile using command prompt ,but still getting the same errors !!
In that case, either you are compiling with a javac
from an older JDK (see what javac -version
tells you!!) or it is a POM file issue.
-
I am trying to compile using command prompt ,but still getting the same errors !! – rishabh Sep 24 '13 at 13:28
-
-
@alexandre1985 - Did you read the answer? Did you try the things it suggested? – Stephen C Mar 22 '15 at 12:51
-
@alexandre1985 - well this question is about eclipse, If you have a question about some other IDE, you should keep searching ... or ask a new Question. – Stephen C Mar 22 '15 at 22:22