0

Is there a way for JDB to execute an instance method of the class where I stopped with a breakpoint?

I would like to do something like:

main[1] this.myMethod()

I know that there is the "eval" command and that you can do something like

main[1] print new java.lang.Runtime().exec("ls")

I have no idea though how I can reference to the "this" pointer.

Thanks in advance.

Phoebus
  • 311
  • 2
  • 17

1 Answers1

1

Never mind, it was actually as easy as:

eval this.myMethod()

Did not load correctly in the first try so it didn't work right away.

Phoebus
  • 311
  • 2
  • 17