[英]Can't find JButton class with OpenJDK 6 and 7
我试图在我的Ubuntu 12.04机器上安装Java,至少可以说我很沮丧。 我安装了OpenJDK / JRE 6和7,但是下面的代码找不到JButton或JFrame类:
package app;
import java.awt.*;
public class AppInterface {
private JFrame main;
private JButton play;
private JButton exit;
}
我从apt-get安装了所有相关的库。 为什么缺少我无法访问Swing库?
我的编译错误:
`Have no file for /usr/lib/jvm/java-7-openjdk-i386/jre/lib/netx.jar`
`Have no file for /usr/lib/jvm/java-7-openjdk-i386/jre/lib/plugin.jar`
`Have no file for /usr/lib/jvm/java-7-openjdk-i386/jre/lib/jfr.jar`
你应该import javax.swing.*;
同样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.