quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.86k stars 2.71k forks source link

Adapt for AWT: detection of System.getProperty("java.home") #44435

Open Karm opened 2 weeks ago

Karm commented 2 weeks ago

Adapt for AWT: [GR-56112] Add detection of System.getProperty("java.home")

Description

Fonts related part of AWT requires at least a fake JAVA_HOME directory structure to look for fonts. We workaround it in Quarkus by: https://github.com/quarkusio/quarkus/blob/main/extensions/awt/runtime/src/main/java/io/quarkus/awt/runtime/JDKSubstitutions.java#L58

We might need to adjust that once https://github.com/oracle/graal/pull/10030 is ready.

Implementation ideas

Exclude warning? Substitute AWT so as this is not needed at all?

quarkus-bot[bot] commented 2 weeks ago

/cc @galderz (awt,mandrel), @zakkak (mandrel,native-image)

zakkak commented 2 weeks ago

Good point.

Exclude warning? Substitute AWT so as this is not needed at all?

I think the best thing would be to substitute FontConfiguration::findFontConfigFile, if I am not mistaken that's the only place where java.home is being accessed.