3 Replies Latest reply: Mar 25, 2011 1:24 PM by 802418 RSS

    Plugin2/JNLP availability by browser??

    802418
      I think my problem is that the Next Generation Plugin (plugin 2) is not available for Safari on Windows, but I'm not really sure. The applet works on multiple other browsers (IE8, 9, Chrome, Firefox). On Safari I'm getting:

      java.lang.NoClassDefFoundError: javax/jnlp/UnavailableServiceException


      which is odd in my opinion: what piece of software would be trying to throw that exception except JNLP? So, how could the exception definition be missing? Unless all of JNLP is missing???!!!??? In which case I'm screwed.

      I've found posts on other websites, none recent, saying that UnavailServiceException indicates plugin2 not installed. But, they don't say the exception's not found!!

      The tester who got this error had to install Java (using the deployJava.js package), but I don't know if she thought it was already installed. In any case, she's definitely running 1.6.0_24.

      The only services I'm starting are Basic and Persistence. (Hmmmmm: I have a catch for UnavailableServiceException. I wonder if the error's being thrown from the catch?? Had the catch worked, the tester would have seen a more informative error message.)

      Anyone with experience running JNLP/Plugin 2 applets on Safari?
        • 1. Re: Plugin2/JNLP availability by browser??
          793415
          Doctor Dad wrote:
          ..Unless all of JNLP is missing???!!!??? ..
          Please fix those sticky '?' & '!' keys.
          I've found posts on other websites, none recent, saying that UnavailServiceException indicates plugin2 not installed. But, they don't say the exception's not found!!
          I have been playing with JNLP services in applets that must degrade gracefully for pre plug-in2 JREs. In order to handle both cases, I needed to jump through some peculiar hoops.
          <ol>
          <li>Configure a property in the JNLP file to determine whether to check for JNLP services.
          <li>As a wrapper for the JNLP service query try/catch, specify a catch for Throwable. This came up because if I got more specific and made it catch UnavailableServiceException, the code would throw a "NoClassDefFoundError javax.jnlp.UnavailableServiceException", even if that code block was never executed (because of the absence of the property). None of the other classes of the JNLP package seem to cause that problem. I am still puzzling over why it occurs.
          </ol>
          • 2. Re: Plugin2/JNLP availability by browser??
            802418
            Andrew-

            I now have no references to javax/jnlp in the applet's import list. But I'm still getting the no class def error.

            My real question has become: Can I use JNLP to launch my applet? (jnlp_href) Or do I have to do all that junk by hand?

            I've emptied the Java and the Safari cache's to no avail.

            Edited by: Doctor Dad on Mar 24, 2011 1:10 PM

            So, then I rebooted and now I'm not getting the NoClassDef, but instead it's not downloading all my jars. The Java Control Panel isn't showing my JNLP file. The Resources tab of the CP is showing one of my three jar files, the main one. Which implies JNLP is working half heartedly. After all, it found my main jar file, which means it had to have parsed the .jnlp.

            Edited by: Doctor Dad on Mar 24, 2011 1:31 PM

            And now I notice this in the console window:

            java.net.MalformedURLException: no protocol:
                 at java.net.URL.<init>(Unknown Source)
                 at java.net.URL.<init>(Unknown Source)
                 at java.net.URL.<init>(Unknown Source)
                 at sun.plugin.liveconnect.SecureInvocation.checkLiveConnectCaller(Unknown Source)
                 at sun.plugin.liveconnect.SecureInvocation.access$000(Unknown Source)
                 at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)

            There's none of my code on that dump, so I have no idea what it's trying to do. But I'm worried that I can't call JavaScript code from Safari.

            Edited by: Doctor Dad on Mar 24, 2011 2:11 PM
            • 3. Re: Plugin2/JNLP availability by browser??
              802418
              I got my applet to run on Safari (on Windows) by removing all reliance on JNLP, including the jnlp_pref attribute in the applet tag (as generated by deployJava.js). I should point out this was done on Windows. I don't know if there's support for JNLP in Safari on Mac's (which would have been the only sensible test.)