The most straightforward way to find invocations of @Deprecated classes/methods in a given .jar file is the standalone CLI-tool jdeprscan that comes with Java 9.

While it is technically possible to use @Deprecated classes, it is highly discouraged. Especially if the the classes are tagged with ”for-removal”, which jdeprscan can detect aswell.

At best, a @Deprecated class/method may be due to a small spelling error. At its worst, using a deprecated class/method may result in unpredictable and hard-to-detect errors.

 

To scan a .jar file for uses of @Deprecated, simply do:

jdeprscan myjar.jar

 

 

This will check the .jar against the latest installed release in your path. For specific releases, you can use the option –release.

To check for-removal, simply do:

jdeprscan myjar.jar --for-removal

 

 

Full documentation here