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

Applet will not load if codebase foldername contains spaces (%20)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 6
    • 5.0
    • deploy
    • x86
    • windows_xp

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      If an applet contains a codebase containing a space, such as "codebase="Java%20Classes", instead of loading it throws a ClassNotFoundException

      With Java 1.4.2, the applet would load and run.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        To reproduce the bug:
      1) Go to: http://goldbug.com/mrj/spaces/life.html
      ==> ClassNotFoundException in console; applet does not load

      HTML source:

      <applet code=Life.class codebase="Java%20Classes" height=400 width=400>
      <param name="side" value=50>
      <param name="gridsize" value=8>
      <param name="paused" value=true>
      <param name="initstate" value="25,25,25,24,26,24,25,26,24,25">
      </applet>


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expect compatibility with Java 1.4.2.
      ACTUAL -
      The applet threw a ClassNotFoundException

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      load: class Life.class not found.
      java.lang.ClassNotFoundException: Life.class
          at sun.applet.AppletClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.applet.AppletClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.applet.AppletClassLoader.loadCode(Unknown Source)
          at sun.applet.AppletPanel.createApplet(Unknown Source)
          at sun.plugin.AppletViewer.createApplet(Unknown Source)
          at sun.applet.AppletPanel.runLoader(Unknown Source)
          at sun.applet.AppletPanel.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: open HTTP connection failed.
          at sun.applet.AppletClassLoader.getBytes(Unknown Source)
          at sun.applet.AppletClassLoader.access$100(Unknown Source)
          at sun.applet.AppletClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          ... 10 more

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Use your own ArcTest.java demo. Create a folder called "Java Classes" and put the .class files into that folder. Then modify the example1.html code to contain 'codebase="Java%20Classes".'

      Note: you need to put the applet on a Web server. The applet works fine if you run it locally.
      ---------- END SOURCE ----------
      ###@###.### 2005-04-26 00:34:41 GMT

            jchusunw Jacky Chu (Inactive)
            ksoshals Kirill Soshalskiy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: