Interesting, when I execute such a command I get
C:\Users\Max\.platformio\packages\tool-stm32duino>java -jar C:\Users\Max\.platformio\packages\tool-stm32duino\maple_loader.jar COM12 2 1EAF:0003 test.bin
maple_loader v0.1
Resetting to bootloader via DTR pulse
Reset via USB Serial Failed! Did you select the right serial port?
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...
Searching for DFU device [1EAF:0003]...
and not a crash. My Java version is
>java --version
java 17.0.7 2023-04-18 LTS
Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing)
You may want to try that exact version for fun?
https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html or similiar.