在jdk1.6中使用Endorsed目录的确切方法是什么 [英] what is the exact way to use Endorsed directory in jdk1.6

查看:135
本文介绍了在jdk1.6中使用Endorsed目录的确切方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的jaxws升级到2.2(jdk1.6与jaxws 2.1捆绑在一起)。我的jdk是(我没有安装公共jre):

I want to upgrade my jaxws to 2.2 (jdk1.6 comes bundled with jaxws 2.1). My jdk is (I did not install public jre):

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode)

jaxws自己的文档中解释如何做到这一点:

In jaxws' own doc they explain how to do it:

解决这个问题的一种方法是将jaxws-api.jar和jaxb-api.jar复制到JRE背书目录中,即 $ JAVA_HOME / lib / endorsed(或$ JDK_HOME / jre / lib / endorsed)

One way to fix this is to copy jaxws-api.jar and jaxb-api.jar into JRE endorsed directory, which is $JAVA_HOME/lib/endorsed (or $JDK_HOME/jre/lib/endorsed)

但我不确定这是否有在我的安装中的任何影响。对于初学者,我只定义了%JAVA_HOME%。文件夹 $ JAVA_HOME / lib / endorsed 是不存在的,所以我创建并复制了两个罐子。但是如果我这样做(wsgen是来自jaxws的工具)

But I am not sure this is having any effect in my installation. For starters I have only defined %JAVA_HOME%. And folder $JAVA_HOME/lib/endorsed is inexistant, so I created and copied the two jars. But if I do (wsgen is a tool from jaxws)

wsgen -version

我仍然得到:

JAX-WS RI 2.1.6 in JDK 6

我也尝试创建文件夹 JAVA_HOME \ jre \ ll\\\endorsed (请注意,在文档中他们说JDK_HOME,但因为我只有JAVA_HOME,所以我使用了这条路径)。仍然是相同的wsgen输出。

I also tried creating folder JAVA_HOME\jre\lib\endorsed (notice that in the doc they say JDK_HOME, but as I only have JAVA_HOME I used this path). Still same wsgen output.

我的问题是:


  1. 有什么区别在文档页面中JAVA_HOME和JDK_HOME之间?什么重要或只有两种方式来引用JAVA_HOME?

  2. 'wsgen -version'是检查所使用的jaxws版本的有效方法,或者这总是调用原始jdk中的exe,但是它并不意味着会使用认可的罐子吗?

  3. 任何人都知道非常详细的步骤在jdk.16中安装jaxws2.2?

  1. What is the difference between JAVA_HOME and JDK_HOME in the doc page? anything significant or just two ways to refer to JAVA_HOME ?
  2. Is 'wsgen -version' a valid way to check jaxws version that is used or this always calls the exe in the original jdk, but it does not mean endorsed jars will be used?
  3. Anyone knows very detailed steps to install jaxws2.2 in a jdk.16?

我找到了这篇文章对我所看到的内容有一些暗示

I found this post that has some hints about what I am seeing I think

推荐答案

jre中包含的wsimport和wsgen位于在作为exe的jre / bin目录中,如果你仍然从命令行调用它,它仍将运行Jax-WS 2.1实现。

The wsimport and wsgen included in the jre are located in the jre/bin directory as exe and if you still call it from command line, it will still run the Jax-WS 2.1 implementation.

更新到Jax-WS 2.2,您需要从jaxws网站下载相关的JAX-WS 2.2.X RI。

To update to Jax-WS 2.2, you need to download the relevant JAX-WS 2.2.X RI from the jaxws website.

您需要将内容解压缩到您的计算机上。

You need to extract the contents onto your computer.

您还需要复制jaxws-api.j ar和jaxb-api.jar进入背书目录(根据您的原始描述)

You also need to copy the jaxws-api.jar and jaxb-api.jar into the endorsed directory (as per your original description)

但是,而不是使用wsgen.exe或wsimport.exe(适用于您的项目),你现在需要使用jax-ws 2.2更新/下载中提供的那个。

HOWEVER, instead of using wsgen.exe or wsimport.exe (as applicable to your project), you now need to use the one provided in the jax-ws 2.2 update/download.

在你从JAX中提取的jaxws-ri目录中-WS 2.2下载,你会看到一个bin目录和4个文件(wsgen.bat,wsgen.sh,wsimport.bat,wsimport.sh),这些是你需要运行的目录。

In the jaxws-ri directory that you've extracted from your JAX-WS 2.2 download, you will see a bin directory and 4 files (wsgen.bat, wsgen.sh, wsimport.bat, wsimport.sh) and these are the ones which you need to run instead.

要运行它们,您必须设置JAXWS_HOME环境变量(有关详细信息,请参阅wsgen / wsimport.bat / sh文件)。

To run them, you have to set up the JAXWS_HOME environment variable (see the wsgen/wsimport.bat/sh files for details).

现在应该允许您使用JDK 1.6

That should now allow you to run JAX-WS 2.2 with JDK 1.6

这篇关于在jdk1.6中使用Endorsed目录的确切方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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