管理对 Java 7 的升级 [英] Managing upgrades to Java 7

查看:21
本文介绍了管理对 Java 7 的升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队使用了大量 Java 应用程序和小程序(内部创建的和来自外部源的).

My team uses a lot of Java applications and applets (both internally created and from external sources).

自从我们用于某些应用程序的 Java 7 发布以来,我们发现了许多不支持 Java 7 的外部应用程序和小程序的问题(虽然我不知道为什么 - 但是,已经与提供这些应用程序的组织的技术支持,他们表示他们的应用程序与 Java 7 不兼容).

Since the release of Java 7, which we are using for some applications, we have found a number of problems with external applications and applets which do not support Java 7 (although I don't know why - however, having spoken to the tech support at the organisations that provide these applications, they indicate that their applications are not compatible with Java 7).

不幸的是,其中许多应用程序声明它们适用于任何(最新)版本的 Java(例如 1.5+).显然,如果这些小程序和应用程序的提供者能够修改他们的代码以指定他们可以使用的 Java 版本,而不是声明他们可以使用他们不可以使用的版本,那就太好了.但是,在此期间我可以做什么?

Unfortunately, many of these applications state that they work on any (recent) version of Java (e.g. 1.5+). Obviously, it would be nice if the providers of these applets and applications would amend their code to specify which version of Java they can work on, rather than stating they can work with versions that they don't. However, what can I do in the interim?

Webstart 应用程序:

对于这些,我创建了一个批处理文件,指定要使用哪个版本的 JRE,例如:

For these I create a batch file specifying which version of the JRE to use e.g.:

C:/"Program Files"/Java/jre6/bin/javaws http://www.website.com/path/to/app.jnlp

有没有更好的方法来做到这一点?

Is there a better way of doing this?

网络小程序:

我在指定网络小程序方面没有取得任何成功.我知道我可以为 Internet Explorer 指定 JRE 版本(例如这个问题),但我不想强制所有网络小程序使用旧版本的 Java - 我只想根据具体情况进行指定.

I've not had any success with specifying for web applets. I know I could specify the JRE version for Internet Explorer (e.g. this question), but I don't want to force all web applets to use an old version of Java - I only want to specify on a case by case basis.

我曾考虑创建一个批处理文件,该文件将使用指定的特定 JRE 启动 Internet Explorer...类似

I had contemplated creating a batch file that would launch internet explorer with a particular JRE specified... something along the lines of

start iexplore [specify JRE] http://www.website.com/pageWithWebApplet.html

...但我不知道如何指定 JRE.有什么想法吗?

...but I don't know how to specify the JRE. Any ideas?

或者,如果有更好的方法,我很想知道.

Alternatively, if there are better ways of doing this, I would love to know.

推荐答案

对于小程序,您可以尝试保存小程序所在的页面及其 JNLP 文件,编辑 JNLP 文件以更改 version="1.6+"version="1.6"(或其他),更改 HTML 文件,以便小程序指向 JNLP 文件的本地版本,但其他所有内容都指向原始站点,将将修改后的文件上传到您的内网,并在您要使用小程序时将您的网络浏览器指向您的内网页面.由于小应用程序的代码库仍将位于外部网站而不是您的内部网上,因此不受信任的小应用程序仍将能够与它们的原始主机建立网络连接.

For an applet, you could try saving the page the applet is in, plus its JNLP file, edit the JNLP file to change version="1.6+" to version="1.6" (or whatever), change the HTML file so the applet points to the local version of the JNLP file but everything else points to the original site, put the modified files up on your intra-net, and point your web browsers at your intra-net's page when you want to use the applet. Since the applet's codebase still will be on the external website instead of on your intranet, untrusted applets will still be able to make network connections back to their originating host.

当然,这假设外部网站允许在 HTTP 引用者不是其站点时下载相关文件(即允许对其资源进行盗链").

Of course, this assumes that the external website allows the relevant files to be downloaded when the HTTP referer isn't their site (that is, it allows "hotlinking" of its resources).

这篇关于管理对 Java 7 的升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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