An approach for improving a network management system by using a virtual
machine in a network device is described. Applets are created and
downloaded to the network device via flash memory or trivial file
transfer protocol ("TFTP"). A loader environment in the virtual machine
loads the applet for execution. The virtual machine converts the applet
into machine code and executes said applet in said network device. This
approach is supported by porting a virtual machine that executes a high
level operating language to an operating system in a network device is
described. A build process is executed wherein makefiles of the operating
system and virtual machine are modified. Modifying the operating system
code comprises providing an entry point to the virtual machine by
starting an operating system process using a command line interface
("CLI"), the CLI accepting the class file as a parameter to start the
application, and terminating the operating system process for the virtual
machine upon exit from the application. Further, modifying virtual
machine code comprises transforming the virtual machine code to pertain
to the operating system platform. Finally, a set of interfaces for users
is provided. As a result, Java.RTM. applets, for example, may be executed
in a router.