Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6745661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:13:54+00:00 2026-05-26T12:13:54+00:00

Where I work they use the AppletContext.showDocument(URL) method when a user logs off our

  • 0

Where I work they use the AppletContext.showDocument(URL) method when a user logs off our application, which is an applet, providing the desired logoff JSP. But they also have code that says if for some reason they are unable to get an AppletContext to simply call the Applet.destroy() method.

We are using a thin client architecture which means that we essentially have a bunch of dumb terminals connected to a server. I mention this because we will often have dozens if not 100’s of instances of JVMs running – one for each applet.

Inside the destroy() method they dispose of all resources they acquired and then get a reference to Runtime and call runFinalization() and gc() – but it does not do a System.exit() or equivalent.

Questions

  1. I understand that frees up resources and leaves you on the same web page but what does it do to the JVM that was running the applet?
  2. If I add a call to System.exit() at the end of the destroy() what will it do to the other JVMs that are running on the thin client server?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:13:55+00:00Added an answer on May 26, 2026 at 12:13 pm

    For context, this is all necessary because while a page is active browsers (or the Java plugin, or both) hang on to your applet instance. Even if you remove it from the DOM or try other tricks to release that memory, until you navigate to a different page your applet instance is retained so you need to fully clean up in destroy(). I’ve done memory profiling which shows it’s referenced in native code somewhere.

    To answer your questions:

    1. This depends on your version of Java. As of Java 6 update 10 (with the next-gen plugin) after a period of time with no applets running Java will shut itself down. This timeout has appeared to get shorter as the JVM startup time has decreased in the last year or two.
    2. I don’t believe applets (even signed ones) are allowed to call System.exit(). If it was allowed though, on modern browsers it would kill the instance of the JVM for that browser, none of the others. In the past it would’ve been likely to shut the entire browser down 🙂

    EDIT:

    Actually there’s more to the story of Answer 1… that’s true everywhere except OS X, where the next-gen plugin wasn’t the default until somewhere around 6u27 (On 10.6 it was Java for OS X update 5, and 10.7 from day 1).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At my work everyone has sql snippets that they use to answer questions. Some
I have a silly use case for eclipse: At work, they use 2 spaces
For typical 3-tiered application, I have seen that in many cases they use a
I want to redirect user to a selected page if they use Any Version
At my work place they use qdb to store data. Can someone tell me
I'm not entierly sure how rngs currently work, but I know they use time
I usually use NUnit as a UnitTest Framework ,however where I work now they
At a place I used to work they typical response to any problem was
What are they and how do they work? Context happens to be SQL Server
What is a stored procedure and how do they work? What is the make-up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.