Hello -
I am getting a error message saying "package acm does not exist" and returns an error code of 1. I verified JDK is installed and the acm file is located in C:\Program Files\Java\jdk1.6.0_02\jre\lib\ext path.
Here Is The Code I'm Trying To Compile:
import acm.*;
public class foo
{
public void run()
{
GCanvas gc = new GCanvas();
GTurtle bob = new GTurtle();
gc.add(bob);
bob.setLocation(200,200);
}
}
I'm a newb so any help would be appreciated.
Help With Java Compile ACM Package
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Nicholas Jordan
- Posts: 124
- Joined: Mon Dec 20, 2004 12:33 am
- Location: Central Texas ISO Latin-1
- Contact:
newb so any help would be appreciated.
Ok,.... (we all know the feeling)
- package acm does not exist Packages work much like folders, except that java's way of package finding is likely to be difficult for the beginner unless you restrict yourself to import statements. Look up import statements on the web. on the java.sun.com site and in any books that mention it. Your diagnostic may be telling you that the lib is not installed, did you provide a fully correct import statememt ?
- foo has nothing to do with acm, and acm could mean anything, which is often a good way to sell books. You are obviously reading a beginner book by someone who knows this, try ELSEVIER, Addison-Wesley Professional Series and ANYTHING by O'Reilly. You may get farther with O'Reilly than with whatever you have. Mayby not >>> what is your goal ? Just learn something or want to become a programmer.
- GCanvas gc = new GCanvas(); is probably a propreiatary tool.