🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12866

Re: How to exit from Applet

#12866
From: Richard Wilkman
Date: Tue, 27 Oct 1998 00:00
55 lines
2410 bytes
Vasu:

You don't exit an applet.  From the error I'd say that you have a
System.exit() call in your code.  This means terminate the VM (and if
you read the JLS they also mention that you should almost never call
this but I don't know how you'd terminate without one).

Anyway, you can't do this in applets.  It's not your VM to terminate
-- it belongs to the browser.  Other applets use it, etc.  You can do
a hide() of all your stuff or even dispose() of everything if you are
certain you are finished.

-Rich

Vasudevan Srinivasan wrote:
> 
> i have a swingbased applet with a menuitem Exit. From netscape or ie
> when i click this menuitem it throws up an error with the following
> stack:
> 
> Exception occurred during event dispatching:
> sun.applet.AppletSecurityException: checkexit
>  at sun.applet.AppletSecurity.checkExit(AppletSecurity.java:239)
>  at java.lang.Runtime.exit(Runtime.java:83)
>  at java.lang.System.exit(System.java:488)
> .....
> 
> my code in exit event is:
>     System.exit(0);
> 
> this works well appletviewer.
> 
> my applet is not signed. may be is it because of this ? is there any
> other way to exit (or close) an applet ? (the question itself maynot be
> sensible since, where can the applet exit TO, from a browser?!) but i
> would like to know the standard practice of quitting an applet from
> browser.
> 
> Thanks
> Vasu

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <36364CBD.F18617F3@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36362227.1A45BA54@netrisk.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,ffb0b555990d6321
X-Google-Attributes: gid111d45,public
From: Richard Wilkman <rwilkman@inprise.com>
Subject: Re: How to exit from Applet
Date: 1998/10/27
Message-ID: <36364CBD.F18617F3@inprise.com>
X-Deja-AN: 405717577
Content-Transfer-Encoding: 7bit
References: <36362227.1A45BA54@netrisk.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing