开发者

NoClassDefinitionFound: javax.xml.ws.Service

I am building a Java Web Service Client application that interacts with a web service in JDeveloper.

I build the web proxy using wizard for Web Service Proxy creation.

I am using JAX-WS method for web service interaction.

When i run this code from the IDE, it runs fine. but when i try to run it using a jar it fails.

Reports me error NoClassDefinitionFound: javax.xml.ws.Service

Please tell me the required number of jar files (or xmls) i need to include in building client jar so that it can run succe开发者_如何学Pythonssfully!!


When you run it as a jar, you need to specify the classpath to the JAX-WS dependency using

java -cp classpath1:classpath2 -jar yourApplication.jar


You can also permanently add the location of the JAX-WS dependency to the PATH environment variable on your system, or whatever system from which you will be running the application. If you do that, you will NOT have to type the following command every time you wish to run the application:

-cp classpath1:classpath2 -jar
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜