Hi

I have this html page in the same directory as the ilookpano.zip file as well as the int.caddy.jpg, why is it not working? I would be most gratefull if some one can help.

I found this applet on someone else's site and just downloaded the .zip file which has all the code in and the .jpg.


Why is this not able to work:


<applet name="ilookpano" code="ilookpano.class" codebase="" mayscript="true" width="390" height="264" archive="">
<param name="initialview" value="358.70, 0.00, 0.63">
<param name="filename" value="int.caddy.jpg">
<param name="splash" value="int.splash.gif">
<param name="toolbar" value="360viewtoolbar.gif">
<param name="backgroundcolor" value="FFFFFF">
<param name="progressfillcolor" value="003366">
</applet>

Thanks
Bill

Dani AI

Generated

Good news: the issue turned out to be a class/resource lookup problem rather than a bug in the applet itself. fixed it by explicitly pointing the applet loader at the right place and telling it where to fetch the bundled archive; ’s tip to unzip first was also the right troubleshooting step to try.

Why that matters: the codebase attribute defines the base URL the Java plugin uses to load classes and archives, and the archive attribute tells the plugin which archive(s) to fetch. An empty codebase attribute can override the default base (the HTML page location) and confuse the loader. When an archive is used the plugin will look inside that file for the class named by the code attribute, so the archive must contain the .class in the correct path (root or the package path). If the class is inside a package, the code value must be the fully qualified class name.

Quick checklist to avoid the same problem and to help debug similar applet loading failures:

  • Inspect the archive contents to confirm the .class files are where you expect:
    jar tf yourArchive.zip

    or

    unzip -l yourArchive.zip
  • If classes are in a package, verify the directory layout in the archive matches the package and that code uses the full package + class name.
  • Try extracting files into the HTML directory and load the class directly (no archive) to see if the plugin can find it.
  • Enable the Java Console to read stack traces (ClassNotFoundException, NoClassDefFoundError). Those messages point exactly to missing files or wrong paths.
  • Use .jar instead of .zip if possible, and ensure server MIME settings don’t interfere (serving .jar as application/java-archive / application/octet-stream is typical).
  • Watch case sensitivity on Unix servers: filenames and package directories must match exactly.

Caution: Java applets are obsolete in modern browsers and many users will be unable to run them today. For long-term viability, consider porting the viewer to a web-friendly technology (JavaScript/WebGL panorama libraries) or packaging as a standalone Java application.

Recommended Answers

All 2 Replies

Did you unZIP the files? There should be a ilookpano.class in there.

Thanks jerbo for your help, but I got it working. I just played aound with pointing a . in codebase="" so it looked like this codebase="." and put ilookpano.zip in the archive="" so it looked like archive="ilookpano.zip" So the whole code looked like this:

<applet name="ilookpano" code="ilookpano.class" codebase="." mayscript="true" width="390" height="264" archive="ilookpano.zip">
<param name="initialview" value="358.70, 0.00, 0.63">
<param name="filename" value="int.caddy.jpg">
<param name="splash" value="int.splash.gif">
<param name="toolbar" value="360viewtoolbar.gif">
<param name="backgroundcolor" value="FFFFFF">
<param name="progressfillcolor" value="003366">
</applet>

Thanks
Bill

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.