10 Replies Latest reply: Jan 20, 2011 6:22 AM by 808981 RSS

    Reasons why signed applets don't be displayed

    808981
      Hi to all:

      I have a HTML that shows (in code) a signed applet, but when I open the HTML in the browser, the applet is not displayed. The Java console also is not displayed.
      The applet is in the correct directory and the signature is valid.

      What reasons can make the applet does not displayed??

      Dani
        • 1. Re: Reasons why signed applets don't be displayed
          sabre150
          Bring up the Java Console ( http://www.java.com/en/download/help/javaconsole.xml) and see what it says about the Applet when you try to run it.
          • 2. Re: Reasons why signed applets don't be displayed
            808981
            When the browser tries to run the applet, the Java console appears and dissapears and the applet is not loaded.
            The area where the applet should be shown in appears in black, but the applet is not loaded in.

            Dani
            • 3. Re: Reasons why signed applets don't be displayed
              sabre150
              805978 wrote:
              When the browser tries to run the applet, the Java console appears and dissapears and the applet is not loaded.
              The area where the applet should be shown in appears in black, but the applet is not loaded in.
              So you don't even get a security screen? I might be able to give some help if you post the HTML that invokes the Applet and a listing of the jar file you have created -
              jar -tf your-jar-file.jar 
              but without this I have nothing to go on. I have no problems (other than the Applets being cached in the client for some stupid reason) creating and publishing Applets and signed Applets.

              Are you able to run a simple "Hello World" unsigned Applet?
              • 4. Re: Reasons why signed applets don't be displayed
                808981
                The applet works properly on its own and the HTML code that launches it is the following:

                <applet code="PinApplet.class"
                               archive="PinApplet.jar"
                               height=150 width=1200>
                               Authentication Form is not supported by the browser
                </applet>
                • 5. Re: Reasons why signed applets don't be displayed
                  sabre150
                  There is nothing obviously wrong with your HTML but you have not published the jar listing!

                  Have you been able to create, deploy and access an unsigned "Hello World" Applet?
                  • 6. Re: Reasons why signed applets don't be displayed
                    808981
                    I got the HTML to show the applet only occasionally, but when I change some code, re-make the applet again and test the HTML and the applet isn't shown.
                    I have a java.policy.applet in the same directory as the HTML and the signature is valid. The applet only uses JDK classes, not external classes, not user-defined classes

                    Dani
                    • 7. Re: Reasons why signed applets don't be displayed
                      sabre150
                      Other than say that you should clear out the Applet cache each time you make a change to the Applet I can't help.

                      I just wonder why you won't answer my question and won't publish the directory listing of the jar file?

                      Bye
                      • 8. Re: Reasons why signed applets don't be displayed
                        808981
                        The directory listing of the jar file: PinApplet.jar

                        -- .classpath
                        -- .project
                        -- PinApplet.class
                        -- PinApplet.java
                        -- PinAppletModel.class
                        -- PinAppletModel.java
                        -- /META-INF
                        · signer.DSA
                        · signer.SF
                        · MANIFEST.MF
                        · REFACTORINGS.XML
                        • 9. Re: Reasons why signed applets don't be displayed
                          sabre150
                          You seem to have some clutter in that jar file. Why do you need .classpath, .project and the java files included.

                          I'm not convinced the two signer files have valid names. I don't get these names in my signed jars so how did you create the signed jar file?

                          What utility did you use to obtain the listing of the jar file because it is not of the format I get when I use "jar -tf your-jar-file.jar".
                          • 10. Re: Reasons why signed applets don't be displayed
                            808981
                            This is result from the command you mentioned:
                            --------------------------------------------------------------
                            META-INF/MANIFEST.MF
                            META-INF/DanielMerida-Barquero.SF
                            META-INF/DanielMerida-Barquero.DSA
                            META-INF/REFACTORINGS.XML
                            PinAppletModel.class
                            PinAppletModel.java
                            PinApplet.class
                            PinApplet.java
                            .classpath
                            .project

                            About .classpath y .project, they are included by Eclipse in the project, but I think I try to unselect them when I export the JAR.
                            About the names of the files, I use this name in other projects and I don't have any problems with it.

                            Dani