When I compile, javac outputs:
Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.`
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.