• Post Reply Bookmark Topic Watch Topic
  • New Topic

-Xlint error  RSS feed

 
tushar panda
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the two lines below on compiling a java file :



is it a error or what ? someone explain it briefly ??
 
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 a warning. To get more detail about what the warning specifically is, provide the flag given when recompiling -- i.e.,

javac -Xlint:deprecation master.java
 
tushar panda
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest Friedman-Hill wrote:It's a warning. To get more detail about what the warning specifically is, provide the flag given when recompiling -- i.e.,

javac -Xlint:deprecation master.java


again showing warning :



what does this error mean ? what is -xlint ? what is deprecated api ?
explain me briefly ?


 
Campbell Ritchie
Marshal
Posts: 56529
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The tool "lint" is designed to try to find errors. Deprecated code is code you ought not to use, either because it doesn't work (eg this and this) or because something better has been developed. Why are you using Frames rather than JFrames? Who told you to use the show() and hide() methods? The show() and hide() methods are deprecated because they are not consistent with JavaBeans; you should use setVisible(boolean).

There is a list of deprecated members in the API: try here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!