Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Java 9 Support

+1 vote

As there is no proper HiDPI support in Java 8, using Java 9 is needed to scale the UI on Windows and Linux. (See http://openjdk.java.net/jeps/263 for details.) This also works for yFiles (tested in BinNavi).

Two flags need to be added to launch yEd properly.

java --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports=java.desktop/com.apple.laf=ALL-UNNAMED -jar yed.jar

in Help by (130 points)
recategorized by
This works for me on CentOS 7 after installing JRE 9.0.4

Make sure to override the GDK_SCALE environment variable if you need to:
env GDK_SCALE=2 /usr/java/jre-9.0.4/bin/java --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports=java.desktop/com.apple.laf=ALL-UNNAMED -jar yed.jar

I do get some warnings in my terminal:
WARNING: package com.apple.laf not in java.desktop
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jidesoft.swing.JideTabbedPane (file:/opt/yEd/yed.jar) to field javax.swing.JTabbedPane.visComp
WARNING: Please consider reporting this to the maintainers of com.jidesoft.swing.JideTabbedPane
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

I haven't tested the full stability of yEd with this new JRE, but I can confirm it opens with the correct Display Scale; only in JRE 9.

David
Mint 19 with Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)

env GDK_SCALE=2 /usr/java/jre-9.0.4/bin/java --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports=java.desktop/com.apple.laf=ALL-UNNAMED -jar {complete-path-to-file}yed.jar

Same Warnings as above. But it works.

Please yworks, add some way to implement this with some settings for HiDPI.

Since version 3.18.1.1 (the most current version at the time of this writing), these flags are part of the launcher script that is generated by the yEd installer script.

Due to the way Java's module system works, it is not possible to "implement this" in any other way.

This is working nicely for me on Fedora 29:

GDK_SCALE=2 /usr/java/jdk-11.0.1/bin/java -jar yed.jar

1 Answer

0 votes
hi. this fails in kubuntu 17.04 with openjdk-9-jre. please fix. the jar app freezes on splash screen, at "enabling module yed". thanks.
by

yEd does not support OpenJDK! Moreover, Java 9 is still beta - use an officially released Oracle Java 8 runtime environment to run yEd. The latest official Oracle Java 8 is 8u144 available from Orcale's Java SE Downloads site.

Is this (waiting for Java 9) going to be the official solution to the unusably small font size of yEd on Linux? I see people have been asking for this feature for *years*.. Is it really that hard to add an entry in the settings file to set the GUI font size?
Legal Disclosure | Privacy Policy
...