WSDL2Java抛出无法找到主类:org.apache.axis.wsdl.WSDL2Java [英] WSDL2Java Throws Could not find main class: org.apache.axis.wsdl.WSDL2Java

查看:6307
本文介绍了WSDL2Java抛出无法找到主类:org.apache.axis.wsdl.WSDL2Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从远程Web服务创建java文件。我下载了轴1.4,将lib文件夹复制到包含以下文件的c:\ data \ axis \ lib:

I am trying to create the java files from a remote webservice. I downloaded axis 1.4, copied the lib folder to c:\data\axis\lib which contains of these files:


  • axis .jar

  • axis-ant.jar

  • commons-discovery-0.2.jar

  • commons-logging -1.0.4.jar

  • jaxrpc.jar

  • log4j.properties

  • log4j-1.2.8 .jar

  • saaj.jar

  • wsdl4j-1.5.1.jar

  • axis.jar
  • axis-ant.jar
  • commons-discovery-0.2.jar
  • commons-logging-1.0.4.jar
  • jaxrpc.jar
  • log4j.properties
  • log4j-1.2.8.jar
  • saaj.jar
  • wsdl4j-1.5.1.jar

我将c:\ data \axis \lib文件夹添加到%AXISCLASSPATH%。现在我尝试使用此cmd创建java类:

I added the c:\data\axis\lib folder to the %AXISCLASSPATH%. Now I am trying to create the java classes using this cmd:

java -cp%AXISCLASSPATH%org.apache.wsdl.WSDL2JAVA http://myurl.com?wsdl

java -cp %AXISCLASSPATH% org.apache.wsdl.WSDL2JAVA http://myurl.com?wsdl

但是我不断收到此错误消息:

However I keep getting this error message:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/wsdl/
WSDL2Java
Caused by: java.lang.ClassNotFoundException: org.apache.axis.wsdl.WSDL2Java
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.apache.axis.wsdl.WSDL2Java.  Program will exi
t.

有人可以帮助我开始工作吗?

Can somebody please help me to get working?

推荐答案

如果您在6之前使用Java版本,则将jar分别添加到类路径中。如果您使用的是Java 6,请参阅这里如果你想使用通配符。

Add the jars to the classpath individually if you're using a Java version before 6. If you're using Java 6, see here if you want to use wildcards.

这篇关于WSDL2Java抛出无法找到主类:org.apache.axis.wsdl.WSDL2Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆