Re: application versus library classes question
David Bélanger <[email protected]> Thu, 24 Feb 2005 22:32:43 -0500
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
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 */
}
David
---
David Bélanger
Web page: http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt