【问题标题】:Using Apache Commons Math in Eclipse在 Eclipse 中使用 Apache Commons Math
【发布时间】:2014-08-06 10:20:26
【问题描述】:

我是 Java 和 Eclipse 的新手,但熟悉其他语言。

我想用

public static Iterator<int[]> combinationsIterator(int n, int k)

我在http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/util/CombinatoricsUtils.html找到它

我已经安装了 Eclipse,但我不知道从这里去哪里。我要导入什么?在我可以使用combinationsIterator 之前,我必须在代码的标题中引用什么?谢谢。

【问题讨论】:

  • Java 库(通常)打包为.jar 文件。您需要获取您打算使用的库的.jar 文件,并在编译执行时将其添加到项目的类路径中。
  • 从下面的 url commons.apache.org/proper/commons-math/download_math.cgi 下载 jar 添加到您的项目并在 java-build 路径中添加该 jar

标签: java eclipse apache class


【解决方案1】:

你必须去下载 jar (their website 并将它添加到 Ecipe 的类路径中。

你想要数学包,可以下载here

要将其添加到类路径,请转到 Eclipse,右键单击您的项目,转到 Properties -> Java Build Path -> Libraries -> Add External Jar 并选择您下载的 jar。

【讨论】:

  • 我用我的进度编辑了我的主要帖子,请指教。
  • @user3633260 这完全是一个不同的问题。为此提出一个新问题。
猜你喜欢
  • 1970-01-01
  • 2015-01-21
  • 2012-04-23
  • 1970-01-01
  • 1970-01-01
  • 2021-12-12
  • 1970-01-01
  • 2013-02-24
  • 2018-05-26
相关资源
最近更新 更多