3

I had problem with my application with Canvas generation ( I'm using JavaFx ). Setting this option helped:

-Dprism.order=j2d

The thing that is problem to is that I cann't find any documentation for prism ( Dprism ). Second problem is that I would like to set up this option via config file.

Properties props = System.getProperties();        
props.setProperty("com.sun.prism.order", "j2d");

Code above dosen't work for me.

kingkong
  • 1,537
  • 6
  • 27
  • 48

2 Answers2

3

These were the properties used by JavaFX 20 months ago (from the adamish blog):

com.sun.scenario.animation.adaptivepulse
com.sun.scenario.animation.AnimationMBean.enabled
com.sun.scenario.animation.nogaps
decora.purgatory
glass.platform
javafx.animation.framerate
javafx.animation.fullspeed
javafx.animation.pulse
javafx.debug
javafx.embed.isEventThread
javafx.sg.warn
javafx.toolkit
javafx.verbose
javafx.version
nativewindow.ws.name
prism.debug
prism.device
prism.dirtyregioncount
prism.disableBadDriverWarning
prism.forcerepaint
prism.multisample
prism.noFallback
prism.order
prism.printallocs
prism.reftype
prism.showcull
prism.showdirty
prism.shutdownHook
prism.tess
prism.tessaa
prism.trace
prism.verbose
quantum.debug
quantum.pulsedebug
quantum.verbose

I do not know what most of the above properties are, when they are set, what values they may have, how they are used or what they do.

The JavaFX Project Lead (Richard Bair), notes:

Just a word of caution, if we haven't documented the command line switches, they're fair game for removal / modification in subsequent releases :-)

There is an issue tracker request to get some of the properties officially documented and supported:

The request is currently scheduled for implementation in Java 9. Access to the issue tracker requires a login, but anybody can signup and comment on the issue or vote for it.

randers
  • 5,031
  • 5
  • 37
  • 64
jewelsea
  • 150,031
  • 14
  • 366
  • 406
1

I was having the same problem. The issues is that if your main class extends Application, there is a launcher class that kicks in before your main method and reads the prism properties before you set them.

If you use a class that doesn't extend Application as the main class and from this one you set the system properties and then call the main method of class extending Application, the properties go through

pranahata
  • 530
  • 4
  • 18