acm.program needs to be included
I watched the Stanford online video lecture about java programming by Mehran Sami.
In every program, you need to include the acm.program.
How should I deal with it?
How could I include the acm.program inside the c开发者_StackOverflow社区ode?
acm.program sounds like a package, which will contain classes used by the programs created in the lectures.
I assume you downloaded these as a .jar, which you need to add to your eclipse project. Right click on your project and follow a path, which i think is:
Project => Properties => Java Build Path => Libraries => Add JAR ...
Then select the jar, click ok, and the classes should be available to you.
EDIT: Once you've done that you can import the classes you need by adding the following line to the top of you java file:
import acm.program.*;
or individual classes like:
import acm.program.DialogProgram;
精彩评论