?
Solved

How to unload a JAR file that was used within a URLClassLoader?

Posted on 2002-03-25
2
Medium Priority
?
2,055 Views
Last Modified: 2013-11-18
Hi all,


In an application I'm developing, we need to invoke "Plugins", these plugins are installed outside of the scope of the application's CLASSPATH. I'm currently using the URLClassLoader in order to instantiate the main class of each plugin. However, the problem with this is that while I've tried to remove any reference to the URLClassLoader when I'm done with a plugin, the JAR file used by the late URLClassLoader is still locked! Only when I completely exit my JVM the file gets released.

My question is: Should I write my OWN ClassLoader that will release the JAR files after first caching their contents, or is there a way to FORCE/HINT the JVM to release these JAR files?


Thanks in advance,
Doron Barak
0
Comment
Question by:doronb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Author Comment

by:doronb
ID: 6893713
Hello again,

Check the following question to see a sample of how I use URLClassLoaders:

  http://www.experts-exchange.com/java/Q.20280834.html


Thanks,
Doron Barak
0
 
LVL 16

Accepted Solution

by:
heyhey_ earned 900 total points
ID: 6894083
> My question is: Should I write my OWN ClassLoader

IMHO you have to write your own classloader
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question