Ending a Java application from JavaScript

<[email protected]> Mon, 10 Jul 2006 16:17:16 +0100
Newsgroups gmane.comp.mozilla.jrex
Message-ID <[email protected]>
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