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

getDocumentBase behave different with java api specification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • tools

      Platform
      Generic
      JDK Build:
      JDK1.2.2, JDK1.3 and JDK1.4 merlin beta refresh b68

      How to reproduce
      1. get the getDocumentBase.tar from this attachment
      2. untar it and go to new
      3. set JAVA_HOME
      4. sh Doit.sh
      you will see
      sh Doit.sh
      JAVA_FLAGS =
      java version "1.4.0-beta_refresh"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b68)
      Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b68, mixed mode)
      URL = http://javaweb.eng/~stuartk/roonadan20010619194412/getDocumentBase.html
      ^^^^^^^^^^^^^^^^^^^^^^
      which is not desired output according java api specification

      please look at jdk1.4/doc/api/java/applet/Applet.html#getDocumentBase(), it said
      "
            Returns an absolute URL naming the directory of the document in which the applet is embedded. For example, suppose an applet is contained within the document:
                      http://java.sun.com/products/jdk/1.2/index.html
            The document base is:
                      http://java.sun.com/products/jdk/1.2/
      "

            iris Iris Clark
            skesunw Stuart Ke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: