JDK-8220098 : HiDPI JWS applications do not scale correctly after changing to main screen
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 8u201
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86,x86_64
  • Submitted: 2019-02-18
  • Updated: 2019-04-08
  • Resolved: 2019-04-05
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 8
8-poolResolved
Related Reports
Relates :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Display Settings in win 10
1st screen 2880.0x1620.0 (scale and layout 175%)
2nd screen 1920.0x1080.0 (scale and layout 100%)

A DESCRIPTION OF THE PROBLEM :
With the display settings (see Runtime Information) after changing display option "multiple display"  from "show only 2" to "show only 1" (main scren)  the aplication is  scaled correctly...until you restart session.
After restarting session the aplications is NOT scaled correctly!

REGRESSION : Last worked in version 8u192

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1 - choose option "multiple display" in windows to "show only in 2"

2 - restart session
java aplication scales correctly

3 - set option "multiple display" in windows to "show only in 1"
java aplication scales correctly

4 - restart session
java aplication is NOT scaled correctly (components and text out of placement)

5 - set option "multiple display" in windows to "show only in 2"

6 - restart session

7 - java aplication scales correctly 



EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
After changing to "show only on 1"  and  restarting session is expected that 
text and components scaled correctly ( before restarting session they are scaled correctly )

ACTUAL -
After setting "show only on 1"  and  restarting session text and components are not scaled correctly

CUSTOMER SUBMITTED WORKAROUND :
clear java cache folder and use java 8u192 

FREQUENCY : always



Comments
JDK-8204512 makes it possible to disable and enable (system) High DPI awareness of a Java process. You can control it using sun.java2d.dpiaware. Java UI will scale up at 175%. The text would not look crisp as the scaling will be performed by Windows by stretching the window bitmap.
05-04-2019

Thank you [~pardesha] for additional information. The bug report did not mentioned sun.java2d.dpiaware=false was used. I confirm jp2launcher.exe in 8u191 does not have <dpiAware> element in its manifest, 8u192 does. Thus last time it worked is 8u191 instead of 8u192. From this point of view, it can be considered a regression.
05-04-2019

Additional input from submitter: "The problem is that JNLP property sun.java2d.dpiaware=false is not being respected in u201 and u202: I suspect because dpiaware=true was added to the webstart manifest after u192. Please see comments in https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8204508: "change making javaws behavior the same as stand alone apps on windows by adding the manifest entry to jweblauncher.exe: crucible review: https://java.se.oracle.com/code/cru/CR-JDK8UDEV-491" If sun.java2d.dpiaware=false is ignored the app will be scaled (app is dpi aware)... because java 8 has problems with Windows scaling, components/text may not scale in proportion between them. With u192 the property sun.java2d.dpiaware=false in JNLP works fine so component are always proportional because there is no scaling envolved So, many apps are not compatible with java 9 or 10 (webstart removed) so they are restricted to java 8. Java 8 has problems with windows scalling and because that app may require to set dpiaware = false in order the components to be proportional In later versions for webstart that's not possible because there's no way to set dpiaware = false The problem is bigger in standalone versions...property -Dsun.java2d.dpiaware=true can't be set since java 8 release https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8080153 "
05-04-2019

Reported with JDK 8u201, the Java Web Start application in multi display setup fails to scale correctly upon switching to main screen. As per description issue is reported as a regression as it does not occur with JDK 8u192. To verfiy, run JWS example "Dynamic Tree Demo" from https://docs.oracle.com/javase/tutorialJWS/samples/deployment/dynamictree_webstartJWSProject/dynamictree_webstart.jnlp with respective JDK versions in a multi screen setup while ensuring te provided display settings. Windows 10 1st screen 2880.0x1620.0 (scale and layout 175%) 2nd screen 1920.0x1080.0 (scale and layout 100%) I did checked this as described in the description with lower resolution (1920*1080), but could not reproduce the issue as stated. The application scaled properly upon switching to main screen. However, this still need to be checked with the listed display settings. Issue is restricted to JDK 8u.
05-03-2019