Unable to find/install the Java package acm.graphics
-
16-09-2019 - |
Question
I get the following error message
RobotFace.java:3: package acm.graphics does not exist
import acm.graphics.*;
^
It suggests me that I do not have acm.graphics -package.
I have tried to find and install the package in MacPorts unsuccessfully by
port search acm
How can you install acm.graphics package in your computer for Java?
Solution
As stated in the answer below, you need the acm.jar file. Here's how to do it in 3 easy steps:
1. Under "downloads", download the acm.jar file here: Stanford's website.
2. See screenshots below. I'm using NetBeans for my IDE, but it should be more or less the same for any IDE. I right-clicked "libraries" and added the acm.jar file. (Note from screenshots: I took these screenshots after I installed the acm.jar file. You won't see this in your libraries folder until after you have completed this procedure.)
3. Refresh your project.
OTHER TIPS
A quick Google search yielded http://jtf.acm.org/.
Note there is a "acm.jar" file. You need to download that and add it to your CLASSPATH.