What is the use of the jdeprscan tool in Java 9?

The jdeprscan tool can be used for static analysis of classes, archives, and folders for the presence of API elements marked as deprecated. This tool only detects items marked as deprecated in Java SE, and it doesn't detect marked items in other libraries. All classes on which the examined class or set of classes depends must be available when compiling or running a class. In the absence of a dependent class, this tool provides a list of unavailable classes preceded by the error: cannot find a class.

Below is the syntax for the jdeprscan tool.


jdeprscan [options] {dir | jar | class}

The "jdeprscan" command can be supported by "jmods\jdk.jdeps.jmod" module file, which can be linked into "lib\modules" JImage file in JDK 9, 10, and 11.

In the below, we have different options available for jdeprscan tool:

       --class-path PATH
-? -h  --help
-l     --list
       --release 6|7|8|9|10|11
-v     --verbose