In my java project I use a third party library (jar) and call a function of that library at start.
public static void main(String args[]) {
long handle = Library.method(params);
if (0 == handle) {
// error
}
}
Use eclipse for the development. The question is, when I run the project (call the main) in RUN mode, I get the handle. But when I call with DEBUG mode (without any breakpoints attached), I do not get the handle. (The run/debug settings are the same, no additional VM or program parameters)
Question:
- How can the library detect that it is called in the debug mode and prevent returning the handle?
- How can I debug this project (I need some debug)