对于Java 9应用程序,如何在Windows上禁用缩放UI? [英] How to disable scaling the UI on Windows, for Java 9 applications?
问题描述
Java 8中没有适当的 HiDPI支持.
在 Java 9 中,JavaFx应用程序可以正确缩放到它们所在的监视器.例如,如果将我的监视器设置为缩放为150%,则Java应用程序将缩放为150%.
请参阅: http://openjdk.java.net/jeps/263
但是,出于测试目的,我需要能够在Windows 10中使用 java.exe标志来禁用缩放. >
此外,也许我可以在应用程序本身中以编程方式禁用(并重新启用)此功能?
我在http://openjdk.java.net/jeps/263
However, for testing purposes, I need to be able to disable scaling by using java.exe flags, in Windows 10. How can I achieve this?
Also, maybe I can disable (and re-enable) this programmatically within the application itself?
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
这篇关于对于Java 9应用程序,如何在Windows上禁用缩放UI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!