RE: Ending a Java application from JavaScript
Ander Ruiz <[email protected]> Wed, 12 Jul 2006 21:27:22 +0200 (CEST)
| Newsgroups | gmane.comp.mozilla.jrex |
|---|---|
| Message-ID | <[email protected]> |
I think that the problem is that you are blocking the
JRexEventDispatcher. Try with this code, I should work
In EndClass, I have the following method
public static void killApplication()
{
new Thread()
{
public void run()
{
System.exit(0);
}
}.start();
}
--- [email protected] escribió:
> Hi all,
>
> Is it possible finish a application from
> JavaScript?
>
> I am trying something like:
>
> <script>
> endClass =
>
java.lang.Class.forName("InfoEducacional.Virtus.Interface.EndClass");
> endObject = endClass.newInstance();
> endObject.killApplication();
> </script>
>
> In EndClass, I have the following method
>
> public static void killApplication() {
> System.exit(0);
> }
>
>
> Unfortunatelly, JFrame and system freeze.
>
> Is there a better way to do this?
>
> Something like this would be nice
>
> <script>
> window.close();
> </script>
>
> Is it possible to handle or capture
> 'window.close()'?
>
> Thanks in advance.
>
> Guilherme Dutra
> _______________________________________________
> JRex mailing list
> [email protected]
> http://mozdev.org/mailman/listinfo/jrex
>
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com