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

  • Home
  • SEARCH
  • 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 6555027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:46:11+00:00 2026-05-25T12:46:11+00:00

In my application i’m using ServiceLoader to load modules(classes from .jar file) with different

  • 0

In my application i’m using ServiceLoader to load modules(classes from .jar file) with different ClassLoaders in order to completely unload them when not needed from the context of the application and from the JVM itself. I know maybe is not a common topic “unload classes from JVM”, there are some conditions for that to happen, so i am making the necessary effort. To make sure if all is working like expected i’m tracing the load and unload of classes with -XX:+TraceClassLoading and -XX:+TraceClassUnloading, the info from this parameters shows me that i can do a complete unload of any module from mi app and from the JVM itself (unload from the JVM happens during a complete GC). All this seems to work fine… but my question is why the .jar files from where the module classes was loaded are keep open by the JVM?, that .jars cant be removed but the JVM says to have unloaded the classes from them. Obviously this is during JVM execution, but why keep open that .jar files if the JVM has no class loaded from them?, there is any thing i can do to force the JVM to free that .jar files?

  • 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-25T12:46:12+00:00Added an answer on May 25, 2026 at 12:46 pm

    Issue of the class load / unload should be deeply explored within different web containers.

    Some googling shows up that Tomcat 6.x has option antiJARLocking that option is used in Tomcat sources at http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/

    Please read the sources and you will get sample of load / unload code there.

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

Sidebar

Related Questions

Application deals with strings that represent decimals that come from different cultures. For example
Application is asp.net MVC. I want to put a textbox for date using mask.
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
Application configuration: Web application using java first method of creating JAX-WS 2.0 Web Services
Application I develop requires several data sources (2 RDBMS and one file storage) to
Application stores configuration data in custom section of configuration file. This information is used
My application (.net 3.5 sp1) uses the HttpWebRequest to communicate with different endpoints, sometimes
My application fetches information from an API. Unfortunately their data isn't very pretty. This
Application requests KML data through AJAX from server. This data is stored in javascript
Application.Run(form); Actually I tried to call this from my project. I got this exception.

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.