Ciao, ho scritto questo programma (primo programma java della mi vita )
codice:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.lang.*;
public class Poker extends JFrame {
private JLabel img1, img2, img3, img4, img5;
private JCheckBox checkImg1, checkImg2, checkImg3, checkImg4, checkImg5;
private JButton button;
public Poker() {
super("Poker Simulator");
Container container = getContentPane();
container.setLayout( new FlowLayout() );
setSize(350, 359);
setVisible( true );
Icon icon = new ImageIcon( "default.gif" );
img1 = new JLabel();
//img1.setIcon(icon);
img1.setToolTipText("Clicca su TIENI per Mantenere");
container.add( img1 );
img2 = new JLabel();
//img2.setIcon(icon);
img2.setToolTipText("Clicca su TIENI per Mantenere");
container.add( img2 );
img3 = new JLabel();
//img3.setIcon(icon);
img3.setToolTipText("Clicca su TIENI per Mantenere");
container.add( img3 );
img4 = new JLabel();
//img4.setIcon(icon);
img4.setToolTipText("Clicca su TIENI per Mantenere");
container.add( img4 );
img5 = new JLabel();
//img5.setIcon(icon);
img5.setToolTipText("Clicca su TIENI per Mantenere");
container.add( img5 );
button = new JButton("Carte!");
container.add( button );
}
public static void main(String args[]) {
Poker PokerSimulator = new Poker();
PokerSimulator.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
}
}
G:\>C:\Sun\AppServer\jdk\bin\javac.exe Poker.java
G:\>java Poker.class
Exception in thread "main" java.lang.NoClassDefFoundError: Poker/class
G:\>java Poker.java
Exception in thread "main" java.lang.NoClassDefFoundError: Poker/java
Che cosa sbaglio e perchè ho questo errore?
Grazie mille