On closing Java shell
Eleonora Di Pietro
dipietro at sun195.iit.unict.it
Wed Sep 27 03:37:14 PDT 2028
Hi all,
I have a question for you. I realized a Java application that can run
with a graphical interface or without it (the user can select it as a
command line option). In both cases, however, the application, while
running, registers itself on a server, so other applications can refers
to it.
When my application is closed it is necessary to deregister it, so that
nobody can refer to it, after its end. That is my problem: if I start
the application with the graphical interface, it is easy to deregister
it because I have associated the deregistration process to the on
closing windows event.
But if I start the application without gui (from a Java shell) when I
press CTRL-C to close the application process I can't do the
deregistration. I tried to rewrite the finalize method of my classes,
but it doesn't work.
Is there someone who can help me solving the problem?
Thanks in advance,
E. Di Pietro
---
To unsubscribe, mail advanced-java-unsubscribe at xcf.berkeley.edu
To get help, mail advanced-java-help at xcf.berkeley.edu
More information about the Advanced-java
mailing list