1

Below are two links to screenshots of Oracle's JavaFX "Hello World" example on my Debian Wheezy workstation.

The first one is built with JDK6u67 with a 1.7 target, and run with the corresponding JRE:
Java 7 screenshot

The second one is built with JDK8u20 with a 1.8 target, and run with the corresponding JRE:
Java 8 screenshot

As you can see, the rendering is awfully wrong when running Java 8. Note also that the nice application icon is replaced in the second screenshot by the X server icon.
It may be worth noting also that the "good", i.e. Java 7, build is also awful when run with Java 8.

Either build works fine on Windows.
Any idea what might be wrong?

Some info about my system: $ X -version
X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.11-2-amd64 x86_64 Debian
Current Operating System: Linux babasee 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.2.0-4-amd64 root=/dev/mapper/babasee-root ro quiet
Build Date: 17 December 2013 07:37:58PM
xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau)
Current version of pixman: 0.26.0

2 Answers2

1

You can solve this by disabling OpenGL rendering, as described at How to disable or bypass Hardware Graphics Acceleration(Prism) in JavaFX .

Either add -Dprism.order=j2d to your command line, or put System.setProperty("prism.order", "j2d"); at the beginning of your program.

Update: The preferred property value is now -Dprism.order=sw.

Community
  • 1
  • 1
VGR
  • 40,506
  • 4
  • 48
  • 63
  • 2
    Put `System.setProperty("prism.order", "j2d");` at the beginning of your program will not work in javafx8, only -Dprism.order=sw will work. Reading of system properties is done in static initialization that runs before main() call. see com.sun.prism.impl.PrismSettings.java in javafx-src for details – picoworm Jan 10 '16 at 09:38
-1

I've resloved installing nvidia-glx package