Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i debug code that invoked with java reflection?

I hava an application which deployed on J2EE application server , inside the application there is implementation of class loader loading jar files into the JVM, inside those jar files there are Test Cases which implements common interface, by java reflection i dynamically invoke (by name) those test cases, the problem is that is like a black box and if test case fails i need to work hard to find what went worng throw the application server logger , is there any way to debug the test cases code? or any suggestion at all? thank you sorry for the long story..

like image 575
assaf Avatar asked Dec 17 '25 06:12

assaf


1 Answers

You should be able to use Java's remote debugging facility. I've done something similar before and I would simply set a breakpoint in the test that failed. This page describes how to set up remote debugging in eclipse. How you enable debugging depends on the app server you're using.

like image 100
Michael Barker Avatar answered Dec 19 '25 23:12

Michael Barker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!