Frage

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?

War es hilfreich?

Lösung

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

Add a shutdown hook.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top