Applet Freakshow: iPhoto applet
Here’s a fun toy applet that mimics iPhoto’s slider-controlled photo canvas. You can download the source and ant build file if you’re interested.
Keep in mind that I’m having trouble getting applets to run in Mac browsers other than Safari… although others seem to be able to make it happen. So if you’re on a Mac and using Firefox, fire up Safari and revisit for crapplet goodness.
Update — I discovered the applet was not working in Safari browsers running on Mac OS X Panther machines — My mom has an eMac running Panther. I tracked this problem down…
On my mom’s eMac, I tried to run the applet. It failed. I opened up the Console.app application in /Applications/Utilities. There I found a Java stacktrace ending with the following error waiting for me:
java.lang.UnsupportedClassVersionError:
org/ditchnet/LightBoxApplet (Unsupported major.minor version 49.0)
This reminded me that I am running OS X Tiger with Java 1.5 Tiger on my Powerbook, while my mom’s eMac runs OS X Panther and therefore, Java 1.4. I began to suspect that something about the applet was indicating that Java 1.5 was required, and that was causing the eMac’s 1.4 Java plug-in to choke.
Then I remembered that I’m using ant’s built-in <manifest> core task to create the manifest file for the applet jar. I checked, and that task automatically inserts the following attribute into the manifest file:
Created-By: 1.5.0 ('Apple Computer')
I suspect the Java 1.4 plug-in was seeing this line and freaking — dumping the stacktrace and exiting. I switched to the following simple, manually created manifest file for the applet jar:
Main-Class: org.ditchnet.LightboxApplet
And everything works fine now. However, due to Safari’s excessive caching of applets, if you had already tried to view the applet in Safari on Panther, you will not successfully see the new version now. You’ll need to clear Safari’s cache ( command-option-e or under the Safari menu ) and then quit Safari and revisit the page.
Here’s a larger version on a separate page.
No comments
Jump to comment form | comments rss [?] | trackback uri [?]