I'm trying to write a java application in Eclipse.
I'm really wanting to use the ACM.Program package, however, my copy of Eclipse doesn't have it installed!
I've looked all over the net, and I can't find a single download for the ACM package.
More info: Whenever I try the code:
package helloGeiodo;
import acm.program.*;
public class Add2 extends Program {
public void run() {
println("This program adds two numbers.");
int n1 = readInt("Enter n1: ");
int n2 = readInt("Enter n2: ");
int total = n1 + n2;
println("The total is " + total + ".");
}
}
I get errors up and down the ying-yang, all implying that there is no such thing as "acm.program".
Anyways, I need to know where to find the ACM package, and, how to install it.
Thanks!
--Flynn
You can download acm.jar
from the ACM Java Task Force and then add it to your classpath .
It appears that the previous link is dead. The files are still available at Eric Roberts' Stanford page .
The general answer is:
lib
directory, but that's just a personal choice. However, I wouldn't recommend using the "ACM" classes. They were an interesting idea, but they didn't catch on.
如果您遵循斯坦福课程,您可以直接将作业(.zip文件)导入新的Java项目。
jtf.acm.org他们让你在那里下载它。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.