Note: this is not the complete code!
package blackJack111;
public class Game extends JFrame implements ActionListener {
private DrawPanel drawPanel;
private JButton btnDeal;
private JButton btnHit;
private JButton btnStand;
private JButton btnNewGame;
private Deck deck;
private int currPlayer;
public Game () {
This is my main method:
public static void main( String args[] ) {
new Game().setVisible(true);
My problem with the current Java code I have is that Eclipse is detecting my package and main method as
"nameOfPackage".Game.Game."
This leads to Eclipse not recognizing the main method because it is being restructured at compile time. This is the error I receive when I try to compile and run:
Error: Could not find or load main class blackJack111.Game.
Can someone help me out here? What am I doing wrong? I have run this code without a package using only the default package, and the entire game did compile and run.
Now that I have a unique package name, the code does not want to compile and run. Any ideas what could be causing this?
How can I fix this problem?

New Topic/Question
Reply



MultiQuote



|