让 Java Axis 在 Windows 上运行?没有发现类定义错误

发布于 2024-08-24 05:17:29 字数 698 浏览 7 评论 0原文

我正在尝试从 Java 应用程序使用 ASP.NET Web 服务。 java 应用程序是在 Windows 机器上使用 Eclipse 构建的。我已经安装了 Eclipse 的 Webservice 工具,并且下载了 Axis 1.3 文件并将所有支持的 .jar 文件(axis.jar、saaj.jar 等)提取到我的 java\lib 文件夹中。

我的环境变量是: JAVA_HOME = C:\Program Files (x86)\Java\jre6; CLASSPATH = .;C:\Program Files (x86)\Java\jre6\lib;

但是,在调试项目时,我收到此错误:

java.lang.NoClassDefFoundError: org/apache/axis/AxisFault

发生的文件有“import org.apache.axis.AxisFault;”就我所知,这就是最上面的。我对 Java 非常陌生,并且具有 .NET C# 背景,因此我对是否将 .jar 文件复制到主 java\lib 文件夹中还是应该将它们复制到其他地方有点模糊。我读到的关于让 axis 工作的所有内容都是针对 Apache Tomcat 和设置 Web 应用程序文件夹等。我真的不需要它,因为这只是 Wowza 的一个插件模块,所以 jar 文件只是由 Wowza 执行,但失败了当尝试访问 Web 服务时。

是我的类路径错误,还是我遗漏了其他内容?任何指导都会很棒!

I'm trying to consume an ASP.NET Webservice from a Java application. The java app is being built with Eclipse on a Windows box. I've installed the Webservice tools for Eclipse and I've downloaded the Axis 1.3 files and extracted all of the supporting .jar files (axis.jar, saaj.jar, etc) into my java\lib folder.

My environtment variables are:
JAVA_HOME = C:\Program Files (x86)\Java\jre6;
CLASSPATH = .;C:\Program Files (x86)\Java\jre6\lib;

However, when debugging the project I get this error:

java.lang.NoClassDefFoundError: org/apache/axis/AxisFault

The file it's happening on has "import org.apache.axis.AxisFault;" up top and that's as far as I've gotten. I'm VERY new to Java and come from a .NET C# background, so I'm a little fuzzy on whether you copy .jar files into the main java\lib folder or if they should be somewhere else. Everything I read on getting axis to work is for Apache Tomcat and setting up Webapplication folders and etc. I don't really need that as this is just a plugin module for Wowza and so the the jar file just gets execute by Wowza, but fails when trying to access the Webservice.

Is my classpath wrong, or am I missing something else? Any guidance would be great!

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

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

发布评论

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

评论(1

高冷爸爸 2024-08-31 05:17:29

我认为你的 jar 文件没有正确添加。转到项目设置并将轴 jar 添加为依赖项。检查这个

I think your jar files are not added properly. Goto the project settings and add the axis jars as dependencies. Check this.

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