문제

is it possible to gather information on all the existing variables within a running .jar file when it exits? I'm running an application on the linux command line of various servers and I try to debug an issue when the jar just stops working on 10% of the systems.

In Android, there is a method called onDestroy() which can be overwritten in order to perform tasks when the app exits. Is there something similar possible in native Java applications? And even if that is the case, how could I collect the data?

도움이 되었습니까?

해결책

In Android, there is a method called onDestroy()..

Add a shutdown hook.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top