Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Dynamically modifying Java class structure

In the Java Language Specification you will find in section 12 what you are asking for. So, classes or interfaces are unloaded by setting, as Eric said, the class loader to null. Look here for more information: http://java.sun.com/docs/books/jls/second_edition/html/execution.doc.html#74294

Regards
Marcus Walla


>-----Original Message-----
>From: aspectj-users-bounces@xxxxxxxxxxx 
>[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Eric Bodden
>Sent: Tuesday, 23 October, 2007 14:30
>To: aspectj-users@xxxxxxxxxxx
>Subject: Re: [aspectj-users] Dynamically modifying Java class structure
>
>
>I am probably not the most competent person but I am quite 
>sure that it's not more than:
>
>myClassLoader = null;
>
>A class loader and all its loaded classes can be GC'ed if the 
>class loader can be GC'ed, IIRC.
>
>Eric
>
>On 23/10/2007, Hendrik Gani <s2116865@xxxxxxxxxxxxxxxxxxx> wrote:
>> Kevin F wrote:
>> > Cool.. I didn't realize the Sun JVM allowed that much flexibility 
>> > nowadays.  I only knew you could unload an entire 
>ClassLoader which 
>> > would unload all the classes that ClassLoader had loaded.
>> If you don't mind me asking (since it's a bit off topic), how do you 
>> unload a ClassLoader? Does it just involve some API calls or does it 
>> involve jvm-specific features?
>>
>> Thanks,
>>
>> Hendrik
>>
>>
>>
>> >
>> >
>> > On Oct 18, 2007, at 11:07 AM, Dean Wampler wrote:
>> >
>> >>
>> >> On Oct 17, 2007, at 8:48 AM, Hendrik Gani wrote:
>> >>
>> >>>> ...
>> >>> Hi guys,
>> >>>
>> >>> In my case, my program doesn't need to be able to swap 
>the loaded 
>> >>> class at runtime, but just out of curiosity, is it 
>really possible 
>> >>> to unload a class in Java as mentioned by Kevin?
>> >>
>> >> Apparently it is: 
>http://www.zeroturnaround.com/javarebel/features/
>> >>
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Hendrik
>> >>
>> >> _______________________________________________
>> >> aspectj-users mailing list
>> >> aspectj-users@xxxxxxxxxxx 
>> >> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx 
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>> >
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx 
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>
>
>-- 
>Eric Bodden
>Sable Research Group
>McGill University, Montréal, Canada 
>_______________________________________________
>aspectj-users mailing list
>aspectj-users@xxxxxxxxxxx 
>https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top