Вопрос

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