• Post Reply Bookmark Topic Watch Topic
  • New Topic

Oracle Copy example won't compile?

 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I just copied, pasted and compiled this example http://download.oracle.com/javase/tutorial/essential/io/examples/Copy.java in CMD, but it generated 64 errors in CMD as well as in NetBeans!!! What is the issue? The main error is "java.nio. ..... " packages are not found!! Please help!
 
Angus Comber
Ranch Hand
Posts: 90
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you actually have the required packages on your system? If so you might need to add them to your classpath.
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java.nio.file package has been added in Java 7. Apparently Oracle has rushed out new examples when they released Java 7.
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for both of your replies.. I really appreciate it.. Just downloaded JDK 7 and installed. Anyway, seems like I have to remove netbeans and reinstall because it is seeking for the previous classpath...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!