Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4140323

initial class loader is not default class loader.

    XMLWordPrintable

Details

    • 1.2fcs
    • sparc
    • solaris_2.4
    • Not verified

    Description



      Name: akC45999 Date: 05/20/98



      The Java Virtual Machine Specification, 5.2 Virtual Machine Start-up reads:

      The Java virtual machine starts up by creating an initial class, which is
      specified in an implementation dependent manner, using the default class
      loader (§5.3.1).

      But the following test shows that the initial class
      is loaded not by the default class loader.

      ----------------- file startup.java
      public class startup {

        public static void main(String args[]) {
      ClassLoader cld=startup.class.getClassLoader();
      if (cld==null) {
      System.out.println("passed");
      } else {
      System.out.println("failed: loader="+cld);
      }
        }

      }

      -------------------------
      Test execution:

      novo64% java -version
      java version "1.2beta4"
      Classic VM (build JDK-1.2beta4-F, green threads, sunwjit)
      novo64% javac startup.java
      novo64% java startup
      failed: loader=sun.misc.Launcher$AppClassLoader@13e4cf3f
      novo64%


      ======================================================================

      Attachments

        Activity

          People

            gbrachasunw Gilad Bracha (Inactive)
            rfqsunw Rfq Rfq (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: