1 Reply Latest reply: Nov 27, 2010 10:04 AM by rfranzen RSS

    applet won't launch when using a search-engine cached or translated page

      My applet won't launch successfully if the page is encased in a search-engine cache envelope, or translated. For example:

      * [url http://translate.google.co.jp/translate?hl=ja&sl=en&u=http://www.r0k.us/graphics/SIHwheel.html&ei=yR7xTNKLOoSdlgfK3YzeDA&sa=X&oi=translate&ct=result&resnum=5&ved=0CEAQ7gEwBDgU&prev=/search%3Fq%3Dtrue%2Bcolor%2Bcharacteristics%26start%3D20%26hl%3Dja%26sa%3DN%26rls%3Dcom.microsoft:en-us:IE-SearchBox%26rlz%3D1I7ADRA_en%26prmd%3Db]Japanese translation of my Interactive Color Wheel

      Is there something I can do in either the Java code or the HTML page itself to allow the applet to work?

      The following appears in the Java Console on failure:
      load: class SIHwheel.class not found.
      java.lang.ClassNotFoundException: SIHwheel.class
           at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
           at java.lang.ClassLoader.loadClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
           at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
           at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: open HTTP connection failed:http://translate.googleusercontent.com/SIHwheel/class.class
           at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
           at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
           at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
           at java.security.AccessController.doPrivileged(Native Method)
           ... 9 more
      Exception: java.lang.ClassNotFoundException: SIHwheel.class
        • 1. Re: applet won't launch when using a search-engine cached or translated page
          A potential solution occurred to me right after I posted, and I think it may be working. (Can't tell for sure until search engine cache's updated with this change.) Basically I expanded the .jar archive name:
          <script type='text/javascript'>
            'Get Java for free at http://java.com/ '
          Before the change, the archive line simply referenced 'SIHwheel.jar'.

          The one downside to this, assuming it works, is that I'll need two versions of the page. A local one on my hard drive for when I want to test before deploying, and the networked version with the full URL. That's a worthwhile trade-off, though.

          Edited by: RichF on Nov 27, 2010 10:39 AM
          PS: the link in first post still fails, but it seems to be accessing yesterday's version of the page (date on bottom). Also I note that the HTML for that Google-translated page and Bing's cache page contain:
          <base href=http://www.r0k.us/graphics/SIHwheel.html />
          That works well for accessing all the locally-referenced images on the page, but for some reason fails to find the .jar file without a complete URL. The [url http://r0k.us/graphics/applet-fu.js]applet-fu.js script does not appearing to be adorning the archive line in any way.