122
JDB Example
In this section, we will learn how to initialize and run java debugger with the help of an example.
- Create a simple java program
JDBExample.java
- Open command prompt and compile your main class with the following command:-
- Now, initialize Java debugger with the following command:-
- The next task is to run java class. So, run the main class with the below command:-
After the execution of command, the following result will be generated on the console.
Note – After displaying the result, the application will exited automatically.
Next TopicJDB Breakpoint