我正在尝试在 Eclipse 中编写一个 java 应用程序。
我真的很想使用 ACM.Program 包,但是,我的 Eclipse 副本没有安装它!
我在网上找遍了,找不到一个 ACM 包的下载。
更多信息: 每当我尝试代码时:
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 + ".");
}
}
我在 ying-yang 上下都有错误,都暗示没有“acm.program”这样的东西。
无论如何,我需要知道在哪里可以找到 ACM 包,以及如何安装它。
谢谢!
--弗林
最佳答案
您可以从ACM Java Task Force 下载acm.jar
然后 add it to your classpath .
看来之前的链接已经失效了。这些文件仍可在 Eric Roberts' Stanford page 获得.
关于Java ACM 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3796879/