Example file picker does not work
When using the file picker:
@Entry(category = FILE,
selectionMode = JFileChooser.FILES_ONLY,
fileExtensions = {"json", "txt", "log"}, // Define valid file extensions
fileChooserType = JFileChooser.SAVE_DIALOG,
name = "I am a file!")
public static String myFile = ""; // The isFile property adds a file picker button
When pressing on the folder button, it does not open and there is an error:
[09:03:08] [Thread-20/ERROR] (FabricLoader) Uncaught exception in thread "Thread-20"
java.awt.HeadlessException: null
at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:164) ~[?:?]
at java.desktop/java.awt.Window.
Fabric version: 0.16.7 and 0.106.0+1.21.1 Midnight version: 1.6.3-fabric Mc version: 1.21.1 Fabric
Which operating system are you on? It seems like your Java environment doesn't support non-headless operation, which is required to create and use external windows.
Windows 11 Surface Pro: Processor AMD Ryzen 7 Microsoft Surface (R) Edition (2.00 GHz) Installed RAM 16.0 GB (15.5 GB usable) Product ID 00330-66953-94488-AAOEM System type 64-bit operating system, x64-based processor Pen and touch Pen and touch support with 10 touch points
Running on IntelliJ Ultimate (If that matters)