如何在 Fitnesse 中引用外部类

发布于 2024-09-09 04:27:18 字数 341 浏览 2 评论 0原文

我有两个 jar 文件。

  • MyProduct.jar(业务逻辑)
  • MyProductFixture.jar。 (调用 bl 的固定装置)

MyProductFixture.jar 依赖于 MyProduct.jar。

当我尝试运行 Fitnesse 来调用 MyProductFixture 中的固定装置时,我收到 MyProduct.jar 中的类的 ClassNotFoundException。

尝试在命令行上设置 -classpath java 参数失败,因为 -jar 命令忽略 -classpath 参数。

如何解决外部依赖?

I have two jar files.

  • MyProduct.jar (The business logic)
  • MyProductFixture.jar. (The fixture that calls the bl)

The MyProductFixture.jar has a dependency on MyProduct.jar.

When I try to run fitnesse calling the fixture in MyProductFixture, I get a ClassNotFoundException for a class in MyProduct.jar.

Attempting to set the -classpath java parameter on the command line fails because the -jar command ignores the -classpath parameter.

How can I resolve the external dependency?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我为君王 2024-09-16 04:27:18

在 Fitnesse 页面上,我必须添加两个类路径引用。

首先是固定装置。 (显而易见),第二个是外部依赖。关键是 *

!path /path/to/MyProductFixture.jar
!path /path/to/my/product/*

注意以下内容不起作用

!path /path/to/MyProduct.jar

On the Fitnesse page I had to add two classpath references.

First to the fixture. (Obvious), the second to the external dependency. The key is the *

!path /path/to/MyProductFixture.jar
!path /path/to/my/product/*

Notice the following does NOT work.

!path /path/to/MyProduct.jar
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文