FULL PRODUCT VERSION :
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) Client VM (build 25.131-b11, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
Java Swing applications are not scaled according to the windows' system settings.
There was a flag in 1.6 like this:
-Dsun.java2d.dpiaware=false
This does not work anymore.
So we do not have the possibility to deliver a swing application that does scale how it should.
I really like to decide on my own whether the application is scaled or not.
So please reintroduce the flag again or find some other solution.
This bug here is open for 2 years:
https://bugs.openjdk.java.net/browse/JDK-8080153
REGRESSION. Last worked in version 6u45
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.) use windows 7/8/10
2.) set display scaling to e.g. 150%
3.) create an arbitrary litte application just shown an JFrame
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
there should be an flag like:
-Dsun.java2d.dpiaware=false
or something similar
ACTUAL -
no way to deliver an application, that scales correctly, how we define it.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
There are three workarounds currently:
1.) open the properties on the java.exe and javaw.exe. Check the compatibility and switch the dpi scaling from "application to "system"
This is quite annoying, because every user of our software needs to do this.
2.) open the javaw.exe or java.exe with a resource editor tool, and change the manifest file by setting the value "dpiAware" to false.
This is not allowed because it would be a breach of lisense agreement.
3.) force Windows to prefer external manifests. Create manifest files for the java.exe and javaw.exe.
This is also cumbersome and may be a security issue.