我在哪里可以找到 jdk 7 中的 jnlp api jar? [英] Where can I find the jnlp api jar in jdk 7?

查看:43
本文介绍了我在哪里可以找到 jdk 7 中的 jnlp api jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
在 JDK 1.7 中找不到 jnlp.jar >

对于jdk 1.6,可以在这里找到(根据我在哪里可以下载JNLP.jar):

For jdk 1.6, it can be found here (according to Where can i download JNLP.jar):

${java.home}/sample/jnlp/servlet/jnlp.jar

但是,我在 jdk 7 home 中没有看到这个目录.

However, I don't see this directory in my jdk 7 home.

去哪儿了?

推荐答案

感谢您提供的所有提示 - 我不知道有单独的示例下载.

Thanks for all your tips - I wasn't aware that there is a separate download for the samples.

这就是我最终做的事情(请注意,我有自己的远程存储库,所以这可能不适用于您):

So here's what I ended up doing (note that I have my own remote repository, so this might not apply to you):

我从 Oracle 的网站下载了 jdk7 示例.在里面我找到了一个 jnlp.jar,它只包含 jnlp API:

I downloaded the jdk7 samples from Oracle's website. Inside I found a jnlp.jar, which contains just the jnlp API:

sample\jnlp\servlet\jnlp.jar

我将其作为 jnlp-api-1.7.jar 部署到我的私有远程存储库(artifactory),然后像这样配置 pom.xml(提供"范围,因为在运行时这些类由 javaws.jar 提供,正如所指出的出自 Aksel Willgert):

This I deployed to my private remote repository (artifactory) as jnlp-api-1.7.jar and then configured the pom.xml like so ('provided' scope because at runtime these classes are provided by javaws.jar, as pointed out by Aksel Willgert):

<dependency>
  <groupId>javax.jnlp</groupId>
  <artifactId>jnlp-api</artifactId>
  <version>1.7</version>
  <scope>provided</scope>
</dependency>

为了完整起见,还有一个部署到 artifactory 的屏幕截图:

And for completeness, a screenshot of the deployment to artifactory:

这篇关于我在哪里可以找到 jdk 7 中的 jnlp api jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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