我在哪里可以找到 Java 6 附带的 JAX-WS 版本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6275265/
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
Where can i find the JAX-WS version shipped with Java 6?
提问by Vicky
I'm using Java 6 for learning more about web Services (JAX-WS). I also read that JAX-WS latest version is available with Metro, i.e. If you're not using JDK6 and planning to use JAX-WS, you can use Metro.
我正在使用 Java 6 来了解有关 Web 服务 (JAX-WS) 的更多信息。我还读到 JAX-WS 最新版本可用于Metro,即如果您不使用 JDK6 并计划使用 JAX-WS,则可以使用 Metro。
I would like to know which version of the JAX-WS is shipped with my JDK? I'm using jdk1.6.0_22.
我想知道我的 JDK 附带了哪个版本的 JAX-WS?我正在使用 jdk1.6.0_22。
采纳答案by Gursel Koca
JAX-WS is part of standart JDK since version 6. You can learn which version of jax-ws by means wsgen or wsimport. You can find them bin subdirectory of your jdk installation.
JAX-WS 从版本 6 开始就成为标准 JDK 的一部分。您可以通过 wsgen 或 wsimport 了解 jax-ws 的哪个版本。您可以在 jdk 安装的 bin 子目录中找到它们。
Q. How do I find out which version of the JAX-WS RI I'm using? Run the following command
$ wsgen or wsimport -version Alternatively, each JAX-WS jar has version information in its META-INF/MANIFEST.MF, such as this:
Build-Id: 12/14/2005 12:49 PM(dkohlert) Build-Version: JAX-WS RI 2.0-12/14/2005 12:49 PM(dkohlert)-ea3
问:如何找出我正在使用的 JAX-WS RI 版本?运行以下命令
$ wsgen 或 wsimport -version 或者,每个 JAX-WS jar 在其 META-INF/MANIFEST.MF 中都有版本信息,例如:
Build-Id: 12/14/2005 12:49 PM(dkohlert) Build-Version: JAX-WS RI 2.0-12/14/2005 12:49 PM(dkohlert)-ea3
回答by chahuistle
Well, according to this link, Java 1.6 comes with at least JAX-RS 2.0. However, according to this other link, Java 1.6 up to release 3 comes bundled with JAX-RS 2.0 and updates 4 and up contain the 2.1 api version.
好吧,根据这个链接,Java 1.6 至少带有 JAX-RS 2.0。但是,根据另一个链接,Java 1.6 版本 3 与 JAX-RS 2.0 捆绑在一起,更新 4 及更高版本包含 2.1 api 版本。
If you want to use the latest available version you can get a zip file following this link, or if you are using Maven you must include the following dependency in your pom.xml:
如果您想使用最新的可用版本,您可以通过此链接获取 zip 文件,或者如果您使用的是 Maven,则必须在 pom.xml 中包含以下依赖项:
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.3</version>
</dependency>