The JAVA environment variable configuration and the CXF Wsdl2java command generate client code __java

Source: Internet
Author: User
Java_home---The meaning of this variable is the Java installation path, the machine is D:\JDK, remember not to add in the back; the semicolon is written D:\JDK;
In the future to be anywhere else with D:\JDK\bin can be written directly%java_home%\bin, equivalent to the path named, its
It's OK to not configure java_home, but for example, your JDK path has changed, and it will be troublesome to change places accordingly, and
Some Third-party software will agree to use Java_home variables (such as: TOMCAT,CXF), or you will encounter various kinds of hemp when using them.
bother to solve. (and a variety of home,mysql_home,cxf_home)
CLASSPATH---The purpose of this variable setting is for the program to find the corresponding ". Class" File (you compile a Java program---A.java that will
To get a A.class class file, you execute Java A in the current directory, and you will get the corresponding results (provided you have set up
Place Classpath as "."). Now, you move the a.class to a different directory (for example, "E:\"), execute Java A, there will be
The noclassdeffinderror exception is because the. class file is not found, and now you add the classpath to: ".;
E:\ "Run Java a again, see what will be the result ~ ~ ~ ~:), everything is normal, Java command found by Classpath. class file!)
Its value is ".; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar (. Represents the current path)
Path--------you hit a command under any path under DOS, first in the current path, then the path, in Left-to-right order, first
In which path to find the implementation of who (such as d:/test; C:/test2 Two directories have wsimport.exe he's going to execute d:/test.
The following Wsimport command

Configure Cxf_home (native E:\jar\cxf-2.5.9\apache-cxf-2.5.9)
Then add%cxf_home%\bin to the path and remember to configure the Java_home
To run the Wsdl2java.bat in the%cxf_home%\bin directory.
(Wsdl2java http://dd../ddws?wsdl)


You can also use the JDK's own wsimport command to generate customer service-side code, as well as
Add her to the path below (wsimport-keep URL)




The code generated in both of these ways is the current path to your DOS window, and you can specify the build path
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.