Help With Java Compile ACM Package

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
ccorbin
Posts: 1
Joined: Fri Sep 14, 2007 12:23 pm

Help With Java Compile ACM Package

Post by ccorbin »

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.
User avatar
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.

Post by Nicholas Jordan »

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.
Put code tags around your code, tell us what you are trying to achieve (in your own words )
Post Reply