81
36
I'm trying to run a Java app (JAR file) on a high-DPI display on Windows 10. The app uses Swing and thus isn't DPI-aware. Normally when I run an application that isn't DPI-aware, Windows will scale it for me, albeit blurry. But for some reason it's not scaling the Java app; I just get a tiny little window in the corner with impossible-to-read text. How do I run a Java app with Windows' high-DPI (blurry) scaling?
Is it your application and do you control the sources/objects, or is it a legacy application that is now unchangeable ? – harrymc – 2015-11-20T14:57:20.863
3It's not my application; no control over the source. – Jeff E – 2015-11-20T18:53:54.507
Bad news, you might need to lower your DPI to run that application. Here are some resources with hacks that might help : Fix blurry fonts in Windows 10, DPI Settings in Windows 10, Windows 10 DPI blurry. Create at least a system restore point backup before trying them out, just in case. The fallback solution might be to return to Windows 7.
– harrymc – 2015-11-20T19:39:42.520You could also try out Display Changer which can change the display resolution, run the program, then restore the original settings.
– harrymc – 2015-11-20T20:34:13.840Please comment on the above comments ... – harrymc – 2015-11-23T08:25:01.663
5@harrymc How would either of the above help? The problem isn't blurry fonts or that it refuses to run, the problem is that everything is tiny. The "blurry" font rendering is what I want to achieve, and as I understood the OP's question, they do too. Setting the DPI scaling to 100% would make the whole system tiny; setting the display resolution to a non-native one would make everything look blurry. (Okay, no blurrier than on a 1080p display for me, but still.) – millimoose – 2015-11-25T20:48:17.760
1@harrymc And while the latter might make the app usable, I'm sure you understand why answering "how do I make X work on a 2160p display?" with "use a worse display" is kind of missing the point. – millimoose – 2015-11-25T20:49:58.567
In its march toward the perfect automatic display on tablets, Microsoft unfortunately doesn't much care about older desktop applications. I have listed all the known display hacks for Windows 10, because not all their effects are known, and they might be helpful if you had to reduce screen resolution or use the magnifier. Display Changer is probably the best solution by reducing resolution only for the duration of running this one app. Another would be having a secondary monitor of lower resolution. If I had a better solution, I would have put it in an answer rather than a comment ... – harrymc – 2015-11-26T07:27:41.293
I wouldn't blame Microsoft for this. Their solution for older desktop applications is the "blurry" upscaling, and it works, even though it's not pretty. The problem seems to be that Java "claims" it can handle a high-DPI display, or otherwise insists on working with physical pixels, as opposed to an upscaled abstraction, but then does is not quite able to cash the checks it's written. (At least for Swing applications.) That's why I was kind of hoping there's a solution on the Java side of things to make it stop pretending it can handle my display when it can't. – millimoose – 2015-11-26T09:13:05.000
(A sane legacy app will actually be presented with a "fake" display to render on that's the dimensions of your actual display divided by your scaling factor. A handy example of such an app would be Steam, whose seemingly incorrect hardware survey results clued me in to this. It actually seems to take some effort to land in the uncanny valley of microscopic rendering, on the part of either an app's developers or whoever made the GUI toolkit they're using.) – millimoose – 2015-11-26T09:21:36.783
The GUI toolkit the app uses is of course the problem here and dates from when hi-res monitors and Windows 10 did not exist. If it worked once in Windows 7, where the display algorithms were less automatic, you might consider downgrading, which is easy enough to do (on condition of having upgraded Windows 7 to 10). – harrymc – 2015-11-26T13:45:05.030