JDK-8233707 : systemScale.cpp could not compile with VS2019
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-11-06
  • Updated: 2020-06-16
  • Resolved: 2019-11-20
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 11 JDK 13 JDK 14
11.0.8-oracleFixed 13.0.4Fixed 14 b25Fixed
Related Reports
Relates :  
Description
I tried to build OpenJDK with VS 2019 (16.3.8), but it couldn't as below.
(My laptop sets locale to Japanese, sorry)

```
c:/OpenJDK/jdk/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp(96): error C2220: ���������������������������������������������������
c:/OpenJDK/jdk/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp(96): warning C4996: 'ID2D1Factory::GetDesktopDpi': Deprecated. Use DisplayInformation::LogicalDpi for Windows Store Apps or GetDpiForWindow for desktop apps.
c:\progra~2\wi3cf2~1\10\include\100183~1.0\um\d2d1.h(3355): note: 'ID2D1Factory::GetDesktopDpi' ������������������������������������
```
Comments
Fix request (13u) Requesting backport to 13u for parity with 11u, applies cleanly.
09-06-2020

Fix request (11u) I would like to downport this for parity with 11.0.8-oracle. Applies clean. I saw it is superseded by 8234398, but it'd like to downport this anyways because then - its recorded that this issue is fixed - 8234398 applies clean.
05-03-2020

This fix is superseded by JDK-8234398.
04-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/a56b7a304bac User: psadhukhan Date: 2019-11-21 09:06:33 +0000
21-11-2019

URL: https://hg.openjdk.java.net/jdk/client/rev/a56b7a304bac User: ysuenaga Date: 2019-11-20 00:29:26 +0000
20-11-2019

http://mail.openjdk.java.net/pipermail/awt-dev/2019-November/015513.html
07-11-2019

Windows Terminal avoids C4996 with pragma directive: https://github.com/microsoft/terminal/blob/9dc922fc37a479dd560675ac4ea1ce3713ae0ada/src/renderer/wddmcon/main.cxx#L447
06-11-2019