When using IntelliJ IDEA,
- open Edit Run Configuration dialog
Right Click → More Run/Debug → Modify Run Configurations…
- Add vm options
- Modify options → Add VM Options → Add VM options
- add -XstartOnFirstThread to VM Options, but NOT Program arguments.
- store as project file, so you don’t need to change configuraions every time.
- Update JDK
If you do everything above but still can’t run your app, make sure you don’t use any Swing/AWT thing in your code.
If it’s still not working, update jdk to 11+. It is the AWTLoader in DesktopAssetManager stopped the main thread. Update JDK will fix it.