This discussion is archived
9 Replies Latest reply: Oct 20, 2010 4:56 AM by 801338 RSS

applet doesn't run in some environments

801338 Newbie
Currently Being Moderated
I received a report today that my Interactive Color Wheel does not run under Ubuntu Linux, neither Firefox nor Chrome.

* http://r0k.us/graphics/SIHwheel.html

I have personally tested in just 3 environments. It works well under Windows 7 with Firefox, IE, and Chrome. The HTML uses the "applet_fu.js" script to launch the applet, which is supposed to support Linux as well as most other environments.

1) could I get some feedback on whether it runs in your environment?
2) does anyone know why it might not be running on the guy's Ubuntu system?

-- Rich

Edited by: 798335 on Oct 3, 2010 5:04 PM
  • 1. Re: applet doesn't run in some environments
    DarrylBurke Guru Moderator
    Currently Being Moderated
    Moderator action: Moved from Java Programming.

    db
  • 2. Re: applet doesn't run in some environments
    801338 Newbie
    Currently Being Moderated
    No one can tell me if it works on their Mac, Win XP, Opera, Unix, etc?
  • 3. Re: applet doesn't run in some environments
    796367 Explorer
    Currently Being Moderated
    It was loading with my browser -- Netscape -- but then I got this:

    java.lang.UnsupportedClassVersionError: Bad version number in .class file

    But I'm not surprised because the plug-in is for v1.5. Why don't you try compiling with an older javac?

    P.S. Love the Six Shooter Yosemite Sam -- P-51?
  • 4. Re: applet doesn't run in some environments
    801338 Newbie
    Currently Being Moderated
    Pierrot, thank you for the feedback. I don't have an older version of JDK, but maybe I could download one. That's kind of funny, though. Until a couple weeks ago the applet had remained the same for 10 years, built with JDK 1.2. It was originally built with 1.1, but 1.2 came out while I was still active with it. I've gone thru a couple computers since then, and hadn't done another Java project until I decided to update the color wheel, adding a library of over 1500 color names.

    I wonder what I'm using that older versions of the JRE don't support...

    -- Rich
  • 5. Re: applet doesn't run in some environments
    793415 Pro
    Currently Being Moderated
    798335 wrote:
    ..I don't have an older version of JDK, but maybe I could download one. That's kind of funny, though. Until a couple weeks ago the applet had remained the same for 10 years, built with JDK 1.2. It was originally built with 1.1, but 1.2 came out while I was still active with it. I've gone thru a couple computers since then, and hadn't done another Java project until I decided to update the color wheel, adding a library of over 1500 color names.

    I wonder what I'm using that older versions of the JRE don't support...
    It is all about the cross-compilation options of javac that you are probably not using when compiling the classes. The important ones are -source and -target, while an even more important option is -bootclasspath.

    The first two require a number, such as 1.3/1.1, while the last requires the path to an rt.jar of the required Java version. The rt.jar holds the core classes of the J2SE. Note that it does not specifically require an SDK to get that rt.jar, just a JRE.

    Using the correct options (and suitable code), it is possible to use a 1.5 or 1.6 compiler to produce code that should work in a Java 1.1 JRE.
  • 6. Re: applet doesn't run in some environments
    796367 Explorer
    Currently Being Moderated
    I wonder what I'm using that older versions of the JRE don't support...
    It's just the version number. When you compile with a v1.6 javac, the class file will have a version number of v1.6 -- unless you take the measures that Andrew outlined above. But since my plug-in is good for only v1.5 and less, it won't run anything higher than that. This is the reason I compile Applets with a v1.4 -- then hopefully, more older and newer browsers will have a plug-in that can run it. We already know how difficult it is to get people to upgrade their computer! Rich, here is my version of the ColorWheel Applet -- v1.4.

    http://www.koala-pierrot.com/workshop/workshop_main.html -- The Chroma Scale.
  • 7. Re: applet doesn't run in some environments
    801338 Newbie
    Currently Being Moderated
    Thanks for the info guys. I've just been compiling with a straight "javac SIHwheel.java". It hadn't occurred to me that there might be compatibility issues with older installations, so long as I was not using features which did not exist before. If I understand correctly, the -target flag is pretty much useless on its own. It needs a -bootclasspath specified for an older JRE to actually force the applet to work on older systems, right? And I need to have the older Java version on my system to have access to to the older boot class file?

    Pierrot, I cannot access your color wheel. I think something is going wrong with the frames. The "Introduction" text shows near the top, as well as a top-navigation frame where only the TOC graphic is active. But no frame shows with the actual applet. That seems to be the case with all your workshops. I have a 64-bit Windows 7 home premium system, and tried with Firefox, IE, and Chrome. All failed with same lack of actual frame that does anything.

    -- Rich
  • 8. Re: applet doesn't run in some environments
    801338 Newbie
    Currently Being Moderated
    Heh, forgot to say that I received feedback from the original Ubuntu user who reported the problem. It turns out that he was using a fairly new installation, and did not realize that the Java Plugin was not installed. No applets would run. Once he installed it, my applet ran fine.

    That said, I'd still like some feedback from Mac, Solaris, and Unix users. Does it run on your system? If not, is it because of the "java.lang.UnsupportedClassVersionError" pierrot saw?

    -- Rich
  • 9. Re: applet doesn't run in some environments
    801338 Newbie
    Currently Being Moderated
    I've asked a configuration question in "Java Upgrade concerning installing old JRE:

    * http://forums.oracle.com/forums/thread.jspa?threadID=1773089&tstart=0

    Now that the major part of my upgrade is complete, I thought it was about time to focus on backwards compatibility.

    I have another question as well. My Ubuntu user is reporting something really weird. When he visits the color wheel page now, the applet launches, but in its own darn window! Here is a screenshot:

    * http://r0k.us/rock/junk/JavaEmbeddedFrame.png

    I do absolutely nothing programmatically to launch a "Java Embedded Frame". Has anyone heard of this behavior before? How do I stop it from happening?

    This is what he told me on 6 Oct, when he first got it working:
    {quote}Oops! I recently changed Linux distributions and Java applets don't
    run. I installed Icedtea-Java-Plugin; now Java applets, including
    yours, work.{quote}
    The embedded frame was not occurring until my recent update, with the colored list widget pane:

    * http://r0k.us/graphics/SIHwheel.html

    -- Rich

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points