JDK-8155579 : -Dsun.java2d.dpiaware cannot over-ride manifest entry.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8u92
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: other
  • CPU: x86
  • Submitted: 2016-04-25
  • Updated: 2017-10-06
  • Resolved: 2017-10-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10Resolved
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :


ADDITIONAL OS VERSION INFORMATION :
any Windows Vista or later

EXTRA RELEVANT SYSTEM CONFIGURATION :
need high resolution (4k monitor), or high resolution tablet - anything offering more than 96 dpi.

A DESCRIPTION OF THE PROBLEM :
The system property

-Dsun.java2d.dpiaware

was removed, in favor of setting the 'dpiAware' to true in the manifest of the Java exe(s).

This is incorrect for a couple of reasons:

1. The auto-scaling of fonts is only applicable to the Windows SystemLookAndFeel. If you are using a different look and feel, you are going to end of with very tiny fonts.

2. You cannot override this at the application level using native code, since you cannot override the manifest entry setting.

3. This is a real problem for WebStart where there may be different look and feels being used. The windows end up being really tiny on a High DPI screen/tablet and are unusable.

I think the proper fix would be to have the font scaling work with all look and feels when running under windows - and in reality, and high-resolution non-72-96 dpi environment.

REGRESSION.  Last worked in version 7u80

ADDITIONAL REGRESSION INFORMATION: 
It was this bug fix that broke it:

https://bugs.openjdk.java.net/browse/JDK-6829055

that was original changed as part of

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6395346

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run any webstart application on a high resolution tablet that does not use the WindowsSystemLookAndFeel.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The windows should be scaled automatically.
ACTUAL -
They are not scaled, because the manifest tells Windows to disable the auto-scaling

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
you need to use a program like 'resource editor' to remove the manifest entry from all of the java executables.

You need to perform this step after every update.


Comments
integrated in 9 as https://bugs.openjdk.java.net/browse/JDK-8073320
06-10-2017

As regression labeled and introduced in 8u or 9 -- targeted to 10
17-02-2017

In 2006 for Vista "hidpi" was not nearly what we see today. 130-150 dpi max. Auto-scaling just made everything fuzzy. Using the manifest entry was Microsoft's recommendation. The property was not actually removed, but the manifest entry makes it non-operational. I presume the submitter wants this as a way to enable auto-scaling to work around the small UI but JDK 9 is properly supporting hidpi on windows so all Swing UIs should scale correctly.
28-04-2016

Checked this with "Dynamic Tree Demo" example (https://docs.oracle.com/javase/tutorial/deployment/webstart/examplesIndex.html) and could observe the reported behaviour. Moving this up for dev. to evaluate.
28-04-2016