• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Coldfusion does not release a .JAR file loaded with URLClassLoader

Guest
Mar 02, 2007 Mar 02, 2007

Copy link to clipboard

Copied

I have created a java library and packaged it inside a .jar file for disribution. I am then using a java's URLClassLoader to load this jar file on the fly in my ColdFusion code (so that the it can be installed on other machines without the necessity for access to the CF/classpath directories).

Everything is working fine and I am able to instantiate my classes successfully. My problem is that after I instantiate a class from that jar file, ColdFusion keeps the file open forever. This prevents me from deleting/renaming the file (effectively making any updates to the file require stopping the CF service).

I tried setting all the variables which hold references to the URLClassLoader and the instantiated classes to empty strings or simulated Null value, and then calling the java.lang.System.gc() garbage collector multiple times... Nothing seems to make ColdFusion let go of the .jar file...

Does anyone have an idea how I can make CF let go of the .jar file?
TOPICS
Advanced techniques

Views

269

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 03, 2007 Mar 03, 2007

Copy link to clipboard

Copied

LATEST
I do not believe you can. That is why CF requires a stop and start as you update its own jars.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation