• Post Reply Bookmark Topic Watch Topic
  • New Topic

Path Class issue  RSS feed

 
Dayo Daniel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I developed a simple app using the path class to access and copy some file
from one directory to the other.. After few months, i upgraded my JDK and later
found put that the .copyTo method is reporting an error... Has the method been deprecated?.
the code snippet is as follow;




[Added code tags - see UseCodeTags]
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dayo. Welcome to the Ranch!

And what error is it reporting?

According to the API docs, java.nio.file.Path, that method doesn't exist. It's not marked as deprecated, which means it was never officially part of the API. Maybe you were working with a pre-release version, and the API got changed?

The functionality you're looking for seems to be in the java.nio.file.Files class.
 
Dayo Daniel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.. just as you suggested i was working with the beta version before.. but i was able to fix it now .. Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!