3 Replies Latest reply: Mar 4, 2013 2:12 PM by jsmith RSS

    Run Application in Browser doesn't work properly, maybe because of FXML?

    dscarminiabielefeld
      Hey Guys, i've noticed that i can't run my app in the browser, when it's using FXML.
      If i start the default Hello World app and start in browser, it works just fine. My self developed App is using FXML and in the browser appears only a grey frame. It asks for permission tho, but nothing more happens.
      Thanks for your help!
        • 1. Re: Run Application in Browser doesn't work properly, maybe because of FXML?
          jsmith
          The problem is that your app requires elevated permissions outside of the standard sandbox for unsigned applications.

          A problem with fxml is that it always required elevated permissions - so all sandboxed JavaFX applications making use of FXML must be signed (at least with the current JavaFX 2.2 version anyway).

          Standalone and native packaged applications don't run in a sandbox, so they don't require signing.
          WebStart and Browser Embedded applications do run in a sandbox, so they always require signing if fxml is used.

          For app signing instructions, see:
          http://docs.oracle.com/javafx/2/deployment/packaging.htm#BABJGFBH "Sign the JAR Files"

          If you are using NetBeans, just click on the File | Project Properties | Build | Deployment | Requested unrestricted access (sign application) checkbox and redeploy your app.

          If you want to sign it using a real code signing certificate, you will need to buy one:
          http://www.thawte.com/code-signing/content-signing-certificates/sun-java/index.html

          See these related threads:
          Re: In need of opinion - desktop shortcut, security warning. "Security Warning"
          Signed Jars "Signed Jars"
          http://docs.oracle.com/javafx/2/deployment/packaging.htm#BABJGFBH "Sign the JAR Files"
          • 2. Re: Run Application in Browser doesn't work properly, maybe because of FXML?
            dscarminiabielefeld
            Hi jsmith,
            thanks for your detailed reply.
            Somehow i get this error while executing it.
            Java-Plug-in 10.15.2.03
            JRE-Version verwenden 1.7.0_15-b03 Java HotSpot(TM) Client VM
            Benutzer-Home-Verzeichnis = C:\Users\marvin
            ----------------------------------------------------
            c:   Konsolenfenster löschen
            f:   Objekte in Finalisierungs-Queue finalisieren
            g:   Garbage Collect
            h:   Diese Hilfemeldung anzeigen
            l:   Class Loader-Liste ausgeben
            m:   Speicherauslastung drucken
            o:   Logging auslösen
            q:   Konsole ausblenden
            r:   Policy-Konfiguration neu laden
            s:   System- und Deployment-Eigenschaften ausgeben
            t:   Threadliste ausgeben
            v:   Thread-Stack ausgeben
            x:   Class Loader-Cache leeren
            0-5: Trace-Ebene auf <n> setzen
            ----------------------------------------------------
                 Match: beginTraversal
            Match: digest selected JREDesc: JREDesc[version 1.6+, heap=-1--1, args=null, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null], JREInfo: JREInfo for index 0:
                platform is: 1.7
                product is: 1.7.0_15
                location is: http://java.sun.com/products/autodl/j2se
                path is: C:\Program Files (x86)\Java\jre7\bin\javaw.exe
                args is: null
                native platform is: Windows, x86 [ x86, 32bit ]
                JavaFX runtime is: JavaFX 2.2.7 found at C:\Program Files (x86)\Java\jre7\
                enabled is: true
                registered is: true
                system is: true
            
                 Match: ignoring maxHeap: -1
                 Match: ignoring InitHeap: -1
                 Match: digesting vmargs: null
                 Match: digested vmargs: [JVMParameters: isSecure: true, args: ]
                 Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ]
                 Match: digest LaunchDesc: file:/C:/Users/marvin/Desktop/Arbeit/ATRadarController/dist/ATRadarController.jnlp
                 Match: digest properties: []
                 Match: JVM args: [JVMParameters: isSecure: true, args: ]
                 Match: endTraversal ..
                 Match: JVM args final: 
                 Match: Running JREInfo Version    match: 1.7.0.15 == 1.7.0.15
                  Match: Running JVM args match: have:<>  satisfy want:<>
            Do I find the solution to this one in one of your links? Or is it just a small thing I miss?
            Thanks in advance!
            • 3. Re: Run Application in Browser doesn't work properly, maybe because of FXML?
              jsmith
              Somehow i get this error while executing it.
              There is no error in what you posted - it looks good to me.
              Do I find the solution to this one in one of your links?
              I don't know. Did you sign all of the jars in your application as suggested?

              There is a troubleshooting guide for this from Oracle, but unfortunately it's down right now :-(
              http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html