How can I suppress javac warnings about deprecated api?

前端 未结 9 1066
遥遥无期
遥遥无期 2020-12-09 01:40

When I compile, javac outputs:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.`
9条回答
  •  爱一瞬间的悲伤
    2020-12-09 01:45

    If it's a core Java API, there is almost certainly a replacement that will do what you want. Run the javac with that extra parameter, and then look at the API for the deprecated method and replace as appropriate.

提交回复
热议问题