How to disable scaling the UI on Windows, for Java 9 applications?

后端 未结 2 1410
青春惊慌失措
青春惊慌失措 2020-12-31 19:34

There was no proper HiDPI support in Java 8.

In Java 9, JavaFx applications correctly scale to the monitor they are in. For example

相关标签:
2条回答
  • 2020-12-31 20:08

    if needed, found another couple of helpful JVM parameters from that website :

    -Dsun.java2d.uiScale.enabled=false
    -Dsun.java2d.win.uiScaleX=1.0 -Dsun.java2d.win.uiScaleY=1.0
    
    0 讨论(0)
  • 2020-12-31 20:19

    I found this obscure option in a substance bug report. This fixes the issue for Swing applications.

    -Dsun.java2d.uiScale=1.0

    If you're using JavaFX you'll need

    -Dprism.allowhidpi=false

    Unfortunately I cannot find official documentation for either of these options

    0 讨论(0)
提交回复
热议问题