Announcement

Collapse
No announcement yet.

Java Scaling on high DPI display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Java Scaling on high DPI display

    I'm on Kubuntu 25.10, (KDE Plasma 6.4.5, Wayland). I installed openjdk. Underneath the symlinks it's got pathnames like /usr/lib/jvm/java-25-openjdk-amd64-bin/java - this may tell someone which version I have. (It was installed this week, without requesting any specific version - if that's even possible.)

    The Kubuntu installer set up one of my monitors to run at 3840 x 2160, with 170% scaling and the other at 3840 x 2160 with 165% scaling. This works decently or better for most purposes.

    Unfortunately, I have several java apps. They work fine on MacOS, with a more-or-less legible display. Unfortunately MacOS 15.5's system settings app declines to tell me what resolutions it's using, but if I recall what it told me on older versions, it doesn't grok scaling - just uses some native resolution. (Text when using these displays with the Mac is a bit larger than on kubuntu.

    The java apps display everything just a bit too small on kubuntu. Using them for a long time seems likely to give me a headache or worse.

    After some online research, I tried
    Code:
    java -Dsun.java2d.uiScale=2.0 -jar foo.jar
    No effect, whatever I set the number to.

    The same thing happened when I tried the GDK_SCALE environment variable.

    I haven't found any other things to try.

    I don't want to change the display settings for the rest of the system; I just want this set of apps to override the system setting (if that's what they are using).

    Does anyone have any ideas?

    Thanks in advance.

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X