1 2 Previous Next 19 Replies Latest reply: Oct 22, 2012 9:26 PM by 970041 RSS

    JavaFX on BeagleBoard xm

    905944
      Hi there,

      I ordered a BeagleBoard xm and installed the JavaFX Developer Preview for ARM (http://jdk7.java.net/fxarmpreview/index.html) on it. When I type java -version it will show me Java SE build 1.7.0_10-ea-b08 which seems to be correct. But I'm not able to get any of the JavaFX samples that I downloaded from the same page started. I followed the procedure that is available at http://jdk7.java.net/fxarmpreview/javafx-arm-developer-preview.html.
      It always tells me that this application requires a newer version of the Java runtime. I tried to compile one of the examples (StopWatch) on my Mac using also jdk1.7.0_10-ea-b09 but it was the same result.
      The only reason why it doesn't work I could think of at the moment might be that I did not setup a new SD card for the BeagleBoard but used the one that came with the board because it had an Angstrom image already installed.

      Any kind of feedback is highly appreciated...

      Cheers,

      Gerrit
        • 1. Re: JavaFX on BeagleBoard xm
          968026
          I see this on occasion, but only because I have multiple JDKs on my beagle. Usually it is because I compile and app with 1.7 and try to run it with 1.6.

          Do you have JAVA_HOME set by any chance ? If it is set, it should point to
          JAVA_HOME=/opt/javafx-preview
          using the install path from the guide.
          • 2. Re: JavaFX on BeagleBoard xm
            905944
            Yep, I set JAVA_HOME and it points to the EA JDK (and I only have one JDK installed).
            • 3. Re: JavaFX on BeagleBoard xm
              968026
              The Angstrom image that came with my board does not have the GLES drivers installed on it. Perhaps yours is a newer image.
              If you don't have/etc/init.d/pvr-init you probably don't have the drivers.
              If you do have the drivers, running /usr/bin/SGX/demos/Raw/OGLES2Water is a good way to make sure they work, though I think I would have a second ssh into the beagle to kill it rather than hitting reset like the doc says.

              I (re)downloaded the preview and the apps, unpacked them both in the same dir, and then did a
              cd javafx-samples-8.0.0-ea
              ../jdk1.7.0_10/bin/java -Djavafx.platform=eglfb -cp ../jdk1.7.0_10/jre/lib/jfxrt.jar:BouncingBalls.jar balls/Main

              and now have balls bouncing on my screen.
              BTW - using -jar with bouncing balls will give you a headless setup error.

              Perhaps you could share your error message.
              • 4. Re: JavaFX on BeagleBoard xm
                905944
                Will check for the gles drivers tomorrow, it seems to be something like that...
                • 5. Re: JavaFX on BeagleBoard xm
                  905944
                  Ok, I manually installed all packages that are mentioned on the Oracle JavaFX embedded page and now I get the following error message when I try to run the BouncingBalls demo:


                  root@beagleboard:~/javafx-samples-8.0.0-ea# /opt/jdk1.7.0_10/bin/java -Djavafx.p
                  latform=eglfb -cp /opt/jdk1.7.0_10/jre/lib/jfxrt.jar:BouncingBalls.jar com.javaf
                  x.main.Main
                  eglInitialize failed!ES2Pipeline: OpenGL ES 2.0 embedded device detected
                  Graphics Device initialization failed for : es2
                  Error initializing QuantumRenderer: no suitable pipeline found
                  java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
                       at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:271)
                       at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:261)
                       at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:190)
                       at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:120)
                       at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:163)
                       at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
                       at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
                       at java.lang.Thread.run(Thread.java:722)
                  Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
                       at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:76)
                       at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:97)
                       ... 1 more
                  java.lang.reflect.InvocationTargetException
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                       at java.lang.reflect.Method.invoke(Method.java:601)
                       at com.javafx.main.Main.launchApp(Main.java:698)
                       at com.javafx.main.Main.main(Main.java:871)
                  Caused by: java.lang.RuntimeException: No toolkit found
                       at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:202)
                       at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:120)
                       at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:163)
                       at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
                       at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
                       at java.lang.Thread.run(Thread.java:722)
                  root@beagleboard:~/javafx-samples-8.0.0-ea#
                  • 6. Re: JavaFX on BeagleBoard xm
                    905944
                    Running the OGLES2Water demo leads to the following error message:

                    root@beagleboard:/usr/bin/SGX/demos/Raw# ./OGLES2Water
                    Exit message has been set to: "PVRShell: Unable to initialise EGL
                    ".
                    PVRShell: EGL Error (EGL_BAD_ALLOC)
                    InitAPI failed!
                    PVRShell: Unable to initialise EGL

                    So it seems to be related to the ogl drivers...
                    • 7. Re: JavaFX on BeagleBoard xm
                      968026
                      I am sorry to say this is one of the annoyances of the Beagle, getting the SGX drivers to work correctly.

                      Do you have /etc/init.d/pvr-init ? I would expect that to be there given you have the demo.

                      We had problems with the init path not recognizing a rev of the GPU but only on certain boards, requiring a manual tweak of the startup code (based on hints in community forums).
                      The first thing I would try is

                      root@beagleboard:~# /etc/init.d/pvr-init restart
                      Stopping PVR
                      Starting PVR

                      and look for errors. You should also end up with something like this:

                      root@beagleboard:~# cat /etc/powervr-esrev
                      5

                      which tells pvr which rev of binary blob to use. If I remove that file...

                      root@beagleboard:~# rm /etc/powervr-esrev
                      root@beagleboard:~# /etc/init.d/pvr-init restart
                      Stopping PVR
                      Starting PVR
                      Starting SGX fixup for ES5.x

                      you get an extra line in the startup as it caches the value for next time.

                      Hope that helps as it pretty much is what I know about getting the drivers to work.
                      • 8. Re: JavaFX on BeagleBoard xm
                        905944
                        Ok, will try that later today...x-fingers that it will help...

                        thanx for your help... :)
                        • 9. Re: JavaFX on BeagleBoard xm
                          968026
                          Any luck ?
                          • 10. Re: JavaFX on BeagleBoard xm
                            905944
                            yes indeed, I'm now able to run JavaFX and all the opengl demos on my beagleboard. To solve the problem you have to modify the following file...

                            /usr/bin/cpuType

                            and replace the following line:

                            sed -e 's/0x00005C00/OMAP3503/' -e 's/0x00001C00/OMAP3515/' -e 's/
                            0x00004C00/OMAP3525/' -e 's/0x00000C00/OMAP3530/'

                            with the following line:

                            sed -e 's/0x00005C00/OMAP3503/' -e 's/0x00001C00/OMAP3515/' -e 's/
                            0x00004C00/OMAP3525/' -e 's/0x00000C00/OMAP3530/' -e 's/0x00000E00/
                            OMAP3530/'

                            Thanx anyway for your help,

                            Cheers,

                            Gerrit
                            • 11. Re: JavaFX on BeagleBoard xm
                              968026
                              Ahh that looks familiar. I am glad you made it past the system setup. I am really happy that you are running JFX :-)
                              • 12. Re: JavaFX on BeagleBoard xm
                                846410
                                Unfortunately I have the same problems as described here. If I follow the instructions in the tutorial, I get the following error messages during first angström boot-up: /etc/init.d/populate-volatile.sh: eval: line 1: can't create /dev/tty0: Permissi
                                on denied. After google-in' a while it turns out that this issue is related to systemvinit process, which was not configured correctly within the narcissus build. I tried some other configurations using systemd but without success.

                                Finally, to bring up a working angstrom distribution i downloaded a prebuild demo image from http://downloads.angstrom-distribution.org/demo/beagleboard/Angstrom-TI-GNOME-image-eglibc-ipk-v2012.01-core-beagleboard-2012.01.11.img.gz and installed the required libgles-omap3 stuff via opkg. I disabled the GNOME startup using: systemctl disable gdm.service and did the modifications that are mentioned here, including proper dvi mode, /etc/init.d/pvr-init restart, rm /etc/powervr-esrev, change /usr/bin/cputype etc.

                                In the end, I was unsuccessful. I would ask gerrit whether it is possible to provide us with a working image?
                                • 13. Re: JavaFX on BeagleBoard xm
                                  905944
                                  Hi there,

                                  Please find the image I used for this on my dropbox: http://t.co/GfPCOhuj

                                  But be aware that this based on 2011.03 which means it won't have proper support for attached touchscreens.
                                  At the moment I'm trying to setup the system based on 2012.05 which should support touchscreens but I'm not there yet.

                                  With the image above I was able to run JavaFX applications on my BeagleBoard xM, so feel free to download and use it.

                                  Cheers,

                                  Gerrit
                                  • 14. Re: JavaFX on BeagleBoard xm
                                    846410
                                    Hey Gerrit, your image works like a charm =). I've installed the preview and finally i'm able to run the demos. I'm looking forward to your new work, please let me know when you got a new image. If you need any help just tell me, I'm always glad to help. Thanks again for your contribution.
                                    1 2 Previous Next