I am programming a Java 10 application using JavaFX for the UI.

Under Ubuntu 16.04 the application was sized appropriately. Under 18.04 suddenly the application is scaled to half its size. I need to get it scaled properly.

I found out that the application is ignoring the screen scaling factor that is set in the Settings. I have it normally set to 200%. Unfortunately the application is using 100% no matter what I set the scaling factor to.

This is on my laptop with a HiDPI display. I have searched the web and haven't found out why this java application is failing to adjust with the proper scaling factor.

Screen Scaling Factor 200%:
Screen Scaling Factor 200%

Screen Scaling Factor 100%:
Screen Scaling Factor 100%


Well, java does not use the system scale. You have to reconfigure your jvm with a scale configuration :

  • It's better to use environment variable, with the example of the Oxygen XML Editor, like this $ _JAVA_OPTIONS=-Dsun.java2d.uiScale=2.0 Oxygen\ XML\ Editor\ 22/oxygen.sh Dec 3 '20 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.