I’m trying to install Java on my Ubuntu 12.04 machine and I’m frustrated, to say the least. I have OpenJDK/JRE 6 and 7 installed, but the following code won’t find the JButton or JFrame classes:
package app;
import java.awt.*;
public class AppInterface {
private JFrame main;
private JButton play;
private JButton exit;
}
I have all of the relevant libraries installed from apt-get. Why’s missing that I don’t have access to Swing libraries?
My compile errors:
`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`
You should
import javax.swing.*;as well.