java 如何修复错误“org.apache.axis 无法解析为类型”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7214415/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 19:07:40  来源:igfitidea点击:

How to fix error "org.apache.axis cannot resolved to a type"?

java

提问by nag

When I build my program, it gives the error:

当我构建我的程序时,它给出了错误:

org.apache.axis cannot resolved to a type

org.apache.axis 无法解析为类型

I've seen on some sites that this may be because of enum type which is not there in the latest version of jdk. Currently I'm using jdk 1.6.x. How can I overcome the problem?

我在一些网站上看到这可能是因为 enum 类型在最新版本的 jdk 中没有。目前我使用的是 jdk 1.6.x。我怎样才能克服这个问题?

回答by Jon Skeet

org.apache.axisisn't a type anyway - it's a package. However, the types within that package are provided by the Apache Axisproject. You'll need to download the libraries and add them to your classpath; the exact details will depend on whether you're using an IDE, the command line, Ant or whatever.

org.apache.axis无论如何都不是一种类型——它是一个包。但是,该包中的类型由Apache Axis项目提供。您需要下载这些库并将它们添加到您的类路径中;确切的细节将取决于您使用的是 IDE、命令行、Ant 还是其他任何东西。

Note that Axis 1 is rather old now... you may wish to consider migrating to a more modern web-service platform.

请注意,Axis 1 现在已经很老了……您可能希望考虑迁移到更现代的 Web 服务平台。

回答by posdef

What this means is that the compiler hasn't got a clue on where to find org.apache.axis, so to solve it you should let the compiler know where to find it.

这意味着编译器不知道在哪里找到org.apache.axis,所以要解决它,你应该让编译器知道在哪里找到它。

Here's a good linkto read a bit up on this particular kind of error (Cannot resolve type).

这是一个很好的链接,可以详细了解这种特定类型的错误(无法解析类型)。