Search code examples
javalinuxjavafxx11rhel

Exporting X Display running JavaFX Scene3D


I have a linux box running RHEL 6.5 and I have a JAR of the following sample JavaFX application https://docs.oracle.com/javase/8/javafx/sample-apps/MoleculeSampleApp.zip

I can compile and run it just fine with no errors and everything displays correctly (identical to https://docs.oracle.com/javase/8/javafx/graphics-tutorial/img/show-molecule.gif). However when I try to export my display to localhost:0.0 I get the following error for each of my Material, Shape3D and Mesh objects:

WARNING: System can't support ConditionalFeature.SCENE3D

The JavaFX application opens but there are no 3D objects within the window.

I have tried exporting to another RHEL 6.5 linux box and the same problem occurs.

I have the 1.8.0_45 JDK installed and version 2.2.12 of the X11 Intel driver.

Is there some configuration of either X or JavaFX which will allow me to correctly export the application to another machine?

EDIT:

So I ran JAR file using both of the following:

java -jar -Dprism.order=sw MoleculeSampleApp.jar
java -jar -Dprism.order=j2d MoleculeSampleApp.jar

without exporting to either localhost or another display and ran into the same problem on my local machine.

This leads me to believe that exporting the display is causing JavaFX to stop using hardware acceleration.


Solution

  • When I ran the program with the -Dprism.verbose=true option I noticed the following in the output:

    Failed Graphics Hardware Qualifier check.
    System GPU doesn't meet the es2 pipe requirement
    Prism pipeline name = com.sun.prism.sw.SWPipeline
    

    Running the JavaFX jar file with the following option seemed to fix the problem:

    java -jar -Dprism.forceGPU=true MoleculeSampleApp.jar
    

    However performance was poor, which is probably to be expected exporting 3D rendering over a network on an older integrated card.