• Post Reply Bookmark Topic Watch Topic
  • New Topic

compile error(overrides a deprecated API)  RSS feed

 
Suela Smith
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi erveryone

anyone can halp me out with this compile error

Error:

java uses or overide a deprecated API

Recompile with -deprecation for details

any help would be greatly apriciated

Suela
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not an error; it's a warning. You can safely ignore it, but it's telling you that there's a better way to do something that you're doing. It's also telling you how to find out more about what specifically the problem is: add "-deprecation" to your "javac" command line, and it will tell you specifically what deprecated API you're overriding.

"Deprecated" basically just means "being replaced by something better."
 
Suela Smith
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where in javac lin should i add "deprecation"
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javac -cp . -deprecation MyClass.java

As one example.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!