Eclipse没有找到javax.swing [英] Eclipse doesn't find javax.swing
本文介绍了Eclipse没有找到javax.swing的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Eclipse找不到 import javax.swing.JOptionPane
Eclipse cant find the import javax.swing.JOptionPane
它位于哪里,如何包含它是否为
Where is it located and how can i include it?
import javax.swing.JOptionPane;
推荐答案
-
必须在Eclipse中安装(并选择)JDK:
There must be an installed (and selected) JDK in Eclipse:
Window > Preferences > Java > Installed JREs
项目必须配置为使用该JDK:
The project must be configured to use that JDK:
Project > Properties > Java Build Path > Libraries
列表中应该有一个类似JRE System Library [JDK7]的条目。如果不按:
there should be an entry like "JRE System Library [JDK7]" in the list. If not press:
Add Library... > JRE System Library
项目应该被创建为Java Project:
The project should have been created as a "Java Project":
Project > Properties > Builders
应包含Java Builder
should include "Java Builder"
这篇关于Eclipse没有找到javax.swing的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文