A virtual machine with mechanisms for class loading and class structure
management in a device having limited file system and/or memory
resources. The virtual machine includes a class loader that obtains one
or more of a set of predefined classes from a network server, thereby
reducing or eliminating the need for a local file system in the device.
The class loader stores the predefined classes into a class structure in
memory in the device. The virtual machine further includes a memory
manager that purges selected ones of the predefined classes from the
class structure so as to optimize the use of the memory consumed by the
predefined classes in the class structure.