Re: application versus library classes question

Chris Pickett <[email protected]> Thu, 24 Feb 2005 22:41:36 -0500
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
David Bélanger wrote:
> On Thu, Feb 24, 2005 at 08:46:36PM -0500, Jennifer LHOTAK wrote:
> 
>>Hi,
>>
>>Is there a way, in sablevm, to distinguish between application and library
>>code?
>>
> 
> 
> yes, the lib code is loaded by the bootstrap class loader.
> 
> app code is loaded by the system class loader (and others if the apps
> creates its own class loaders).
> 
> The bootstrap class loader does not have an associated ClassLoader
> instance.
> 
> if (class->class_loader_info->class_loader == NULL) {
>   /* bootstrap class loader - libs */
> } else {
>   /* application/user class loader */
> }

Okay, David's solution is apparently much better than mine.

Chris