JAVA ERROR---Access restriction: The type JOptionPane is not accessible due to restriction on requir

换个jdk版本试试;如果不行的话,JRE system library的导入问题,将JRE system library重新导入:


1.选择工程->Properties->Java Build Path->Libraries,删掉原来的JRE system library。 

2.点击"Add Library"->"JRE system library"->next->选择“alternate JRE:”->"installed JREs"->Add,然后就选择要使用的JRE,比如是jre1.5.0_11,最后保存,就完成了修改。


最好别用1.8的JDK。

你可能感兴趣的:(JAVA ERROR---Access restriction: The type JOptionPane is not accessible due to restriction on requir)