0 Replies Latest reply: Apr 27, 2013 12:55 AM by 981612 RSS

    java 7 update 21 liveconnect oddities


      I'm struggling to figure out the magic to get my applet to work under the latest Java. I've got a fairly simple applet which prints to various printer types. It's been working great until update 21 escaped.

      My test case assumptions:

      * Applet is signed using my cert issued to me through Godaddy (not self-signed).
      * I've tossed the " Trusted-Library: true" item in my manifest.mf file and also within the <manifest> attributes in my build.xml for creating a signed .jar file.
      I can only assume that Netbeans is reading the manifest.mf file and the setting at compile.
      * No special changes on the Java JRE Advanced settings for Mixed code (sandboxed vs trusted) security verification- it's set to enable as a vanilla install.

      Case 1 which works: Calling the execution of my applet using the <applet> tags within my PHP: works fine
      Case 2 which fails: Calling the applet through the use of JNLP, javascript <script> with deployJava.runApplet(attributes, parameters, '1.6') within my PHP:

      In Case 1, I get the security question about installing the Certificate and running the applet, then it just works. I can repeatedly execute the printing function without issue. Further usage just pops up the Java console window for debugging but ultimately no extra user interaction needed and it prints as expected.

      In Case 2, I get the security warning box with the "The applet has requested access to the printer. Do you want to allow this action?" text. I shouldn't see this warning message! Added to the insult the functionality is just plain broke: If I click on OK, it does print. If I click on the "Always allow this applet access to the printer" checkbox and hit okay, it throws up another Security Warning pop box with the same message along with another Java console window. If I click on the check box and hit okay, it goes through but I get a failure in the console and I don't see the print (there are null parameters passed). So bottom line, I can't say "just always allow it". The pop-up box will always come up in this case.

      Since the update 21 release deal with calls of applets through javascript, I assume that this is the mixed code/sandbox issue. But it sure seems this is a bug to me. Anyone got opinions on this?

      -Thanks in advance

      Edited by: Gateslinger on Apr 26, 2013 5:54 PM