質問

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