With Delphi, I wrote a DLL that can be called from Java via JNA (Java Native Access) . The methods in this DLL are just simple operations, but for future use and more complex calls, I would like to know how I can use the Delphi debugger if the DLL is called directly from the Java (or from the Java IDE).
I believe the answer to this question will be the same as for the stack overflow Debugging a DLL file in Delphi .
In fact, since you are debugging a Delphi DLL file in a Delphi environment, it does not matter who is on the top call stack.
It works if I define a host application (Java) and set the correct arguments:
The following are the testrunner command line arguments in JUnit: http://junit.sourceforge.net/junit3.8.1/javadoc/junit/textui/TestRunner.html
Why not debug the DLL in Delphi first? There, the unit testing framework for Delphi is called DUnit . You'll still want to write integration tests for the entire system, but you can mock external dependency in your JUnit unit tests.