Set `java.awt.headless` to `true` due to Windows 11 issues (#312)

* set java.awt.headless to true due to Windows 11 issues

* do not force headles mode but us it as default
This commit is contained in:
HeinrichAD 2023-09-06 21:23:55 +02:00 committed by GitHub
parent 608b58b3e0
commit 46077bf5b7
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -121,6 +121,10 @@ public class DiagramResponse {
initialized = true;
// set headless mode manually since otherwise Windows 11 seems to have some issues with it
// see Issue#311 ::
// NOTE: This can only be set before any awt/X11/... related stuff is loaded
System.setProperty("java.awt.headless", System.getProperty("java.awt.headless", "true"));
// set security profile to INTERNET by default
// NOTE: this property is cached inside PlantUML and cannot be changed after the first call of PlantUML
System.setProperty("PLANTUML_SECURITY_PROFILE", SecurityProfile.INTERNET.toString());