Date: Fri, 15 Aug 1997 16:08:47 -0700
From: Steve_Souders@krinfo.com (Steve Souders)
Subject: unloading .class files
To: java-security@web2.javasoft.com
Hi.
I've written a Java application that is like a Form-based Java development
environment for non-programmers. Here's the typical usage scenario:
1. user fills out form
2. application takes inputs from form and writes a .java file
3. application compiles .java file
4. application does a Class.forName(...).newInstance() to test it
This works great. People love it. BUT.....There's one problem. If during testing
in step 4 the user decides to make a change, they repeat the cycle, and when the
application calls Class.forName() the old class is still in memory and so the
new and improved class isn't loaded.
I started looking at building a custom ClassLoader, but I still don't see any
document about how to *unload* a class that's already in memory.
Any suggestions?
Thanks.
-Steve Souders
Knight-Ridder Information
steve_souders@krinfo.com