Improved techniques for accessing Java class files are disclosed. The
techniques provide a mechanism that will generally improve the efficiency
of virtual machines by providing a directory for Java class files. The
directory can be implemented as an attribute in the attribute portion of
the Java class files. Various components of the Java class file can be
accessed efficiently by using the directory. In addition, techniques for
accessing various components of Java class files using directories are
disclosed. The techniques utilize the directory to allow efficient access
to the class file. Thus, unlike conventional techniques, there is no need
to perform sequential reads in order to locate various components of the
Java class file. This allows for better use of resources. As a result, the
invention can improve the performance of virtual machines, especially
those that operate with limited resources (e.g., embedded systems).