I have the ubiquitous HelloWorldApp.java file
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
I run:
javac HelloWorldApp.java
then I run:
jdb HelloWorldApp
I get:
Initializing jdb ...
>
I am typing:
stop at HelloWorldApp.main:7
where will be offered
then i get
Deferring breakpoint HelloWorldApp.main:7.
It will be set after the class is loaded.
>
I am typing:
run
where will be offered
then i get
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Hello World!
The application exited
I didn’t enter anything in this last invitation, he just left without breaking. My question is why did he output these Throwable lines and why didn't the debugger stop at the breakpoint I gave it?
source
share