5

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%

1 Answer 1

5

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

-Dsun.java2d.uiScale=2.0 
1
  • 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, 2020 at 0:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .