0

I am trying to write the chapter 7 program of blackjack from the Java book my school uses and everything in my code is working except for the imports. I am importing java.awt and BreezyGUI and it is giving me the error message "The package java.awt is not accessible" and "The package BreezyGUI is not accessible"

Direct code:

import java.awt.*;
import BreezyGUI.*;

I use a mac pc (it is slightly older but has updated software) and the Eclipse IDE that I use is 2022-12. Can someone help me with importing this the right way and using the right path? I'm not very good at programming but need to get this project done for my class. ANY HELP WILL BE APPRECIATED!!

I've tried getting four different BreezyGUIs and different classpath routes but nothing has worked. I don't understand the java.awt so I don't know what to do there.

Here's what I have creating the frame and with imports (I can share more code if anyone needs):

package blackjack; import java.awt.; //java.awt is underlined red with error message "The package java.awt is not accessible" import BreezyGUI.; //BreezyGUI is underlined red with error message "The package BreezyGUI is not accessible" public class blackjackInterface extends GBFrame {

andrewJames
  • 19,570
  • 8
  • 19
  • 51
Addi E
  • 1
  • Show us your project setup. Which level of Java are you targeting? Which runtime are you compiling against? IDE aside, show us why this *should* work for your setup. – nitind Apr 22 '23 at 03:44
  • You probably have a module-info.java in your project so you are using the Java module system which requires you to specify that you are using these modules in that file. Delete the module-info.java to stop using the module system. – greg-449 Apr 22 '23 at 05:38
  • thanks all! i figured out a new system with a non-mac computer:) – Addi E Apr 24 '23 at 00:18

0 Answers0