Eclipse中JOptionPane对话框无法正常显示的解决求助
JOptionPane Dialog Fails to Display in Eclipse 2019-09 (Java 12.0.2, Windows 10)
I'm stuck with a frustrating issue where JOptionPane dialogs refuse to show up at all when running my Java code in Eclipse 2019-09. I'm working with Java 12.0.2 on Windows 10 Home 1903, and even the simplest test case won't display the dialog window—no errors are thrown, but the dialog just never appears.
Environment Details
- Eclipse version: 2019-09 (tried downgrading to 2019-06 with no improvement)
- Java version: 12.0.2
- OS: Windows 10 Home 1903
- Eclipse launch command (retrieved via "Show Command Line" button):
C:\Program Files\Java\jdk-12.0.2\bin\javaw.exe -Dfile.encoding=UTF-8 -classpath "C:\Users\Michael\eclipse-workspace\test\bin" test.test
Steps I've Already Tried (All Unsuccessful)
- Switched to an older Eclipse version (2019-06)
- Renamed both the test file and class name to rule out naming conflicts
- Moved my Eclipse workspace to a completely new directory
- Forced OpenGL rendering through Nvidia Control Panel using my dedicated GPU
- Added
JDK\binto the system PATH and properly configured theJAVA_HOMEenvironment variable
Minimal Test Code
Here's the simple program I'm using to reproduce the issue:
package test; import javax.swing.JOptionPane; public class test { public static void main(String[] args) { JOptionPane.showMessageDialog(null, "test"); } }
Running this code results in the dialog failing to appear, with no visible errors or logs to indicate what's going wrong.
内容的提问来源于stack exchange,提问作者Zugidor
相关产品推荐
相关产品推荐

