Java Deprecated API Scanner tool (jdepscan) in Java 9 with Examples Last Updated : 30 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report Java Deprecated API Scanner tool: Java Deprecated API Scanner tool i.e. jdeprscan is a static analyzing command-line tool which is introduced in JDK 9 for find out the uses of deprecated API in the given input. Here the input can be .class file name, directory or JAR file. Whenever we provide any input to jdeprscan command line tool then it generates the dependencies to the system console. jdeprscan introduced with various options which affect the output. As per option, jdeprscan command-line tool generates the output. jdeprscan tool identifies the deprecated APIs which defined by Java SE Deprecated APIs but it will not list out the deprecated APIs which is used by third-party libraries. Syntax for using jdeprscan tool: jdeprscan [options] {class|dir|jar} Example: Java // Program to illustrate the output of jdeprscan tool import java.awt.*; class Geeks extends Thread { public void run() { System.out.println("Child Thread"); } public static void main(String args[]) { Thread thread = new Thread(); thread.start(); thread.stop(); List list = new List(); list.addItem("Geeksforgeeks"); Integer i = new Integer(100); System.out.println(i); } } Compile Time Console: Note: Geeks.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Output: jdeprscan Geeks.class Various options available for jdeprscan: --release 6|7|8|9: It will list out the uses of deprecated APIs in the given argument as per given release. Suppose we are using JDK 9 and we want to list out the deprecated APIs as per Java release 7, then we can use this option. Output: jdeprscan --release 6 Geeks.class jdeprscan --release 7 Geeks.class --verbose: It will enable printing of additional message during listing out deprecated APIs. Output: jdeprscan --verbose Geeks.class --version: It will specify the version of jdeprscan. Output: jdeprscan --version 9.0.4 --full-version: It will print the version of the jdeprscan tool. Output: jdeprscan --full-version 9.0.4+11 --help: It will display the help message for user. Instead of using -help, we can use -h also. Output: jdeprscan --help --list: It will list out the deprecated APIs. Instead of using -list, we can use -l also. Output: jdeprscan --list Comment More infoAdvertise with us Next Article Java Deprecated API Scanner tool (jdepscan) in Java 9 with Examples B bishaldubey Follow Improve Article Tags : Java Technical Scripter 2019 Practice Tags : Java Similar Reads javap tool in Java with Examples javap tool The javap tool is used to get the information of any class or interface. The javap command (also known as the Java Disassembler) disassembles one or more class files. Its output depends on the options used (â-câ or â-verboseâ for byte code and byte code along with innards info, respective 2 min read Scanner delimiter() method in Java with Examples The delimiter() method ofjava.util.Scanner class returns the Pattern this Scanner is currently using to match delimiters. Syntax: public Pattern delimiter() Return Value: The function returns the scanner's delimiting pattern. Below programs illustrate the above function: Program 1: Java // Java prog 2 min read Scanner close() method in Java with Examples The close() method ofjava.util.Scanner class closes the scanner which has been opened. If the scanner is already closed then on calling this method, it will have no effect. Syntax: public void close() Return Value: The function does not return any value. Below programs illustrate the above function: 1 min read Scanner toString() method in Java with Examples The toString() method of java.util.Scanner class returns the string representation of this Scanner. The exact format is unspecified. Syntax: public String toString() Return Value: This function returns the string representation of this scanner. Below program illustrates the above function: Program 1 1 min read Scanner nextLine() method in Java with Examples The nextLine() method of java.util.Scanner class advances this scanner past the current line and returns the input that was skipped. This function prints the rest of the current line, leaving out the line separator at the end. The next is set to after the line separator. Since this method continues 2 min read Like