如何强制在Java 1.5.0_14 JRE(而不是JRE 1.7)中打开JNLP文件 [英] How to force to open JNLP File in Java 1.5.0_14 JRE instead of JRE 1.7
问题描述
我有一个基于Java 5的Java Web Start应用程序,需要在Windows PC上打开它. PC已安装JRE 1.7,并将JRE 1.5.0_14手动复制到另一个驱动器(d :).问题是,无论何时我想打开JW Start应用程序,它都将使用Java 7打开.即使我使用JRE 1.5.0_14中的javaws可执行文件,某些属性仍然会引用JRE 7文件.如何强制JRE 1.5.0_14仅为此应用程序运行?
I have Java 5-based Java Web Start application which I need to open on a Windows PC. PC has JRE 1.7 installed, with JRE 1.5.0_14 copied manually to the another drive (d:). The problem is that whenever I want to open the JW Start application, it opens using Java 7. Even if I use the javaws executable from JRE 1.5.0_14, somehow some properties still refer to JRE 7 files. How can I force JRE 1.5.0_14 to run just for this application?
预先感谢&最好的问候.
Thanks in advance & Best Regards.
顺便说一句,我忘了提到我需要为另一个应用程序使用Java 1.7.以便使用电子签名应用程序.
Edit 1: By the way, I forgot to mention that I need to use java 1.7 for my another app. in order to use e-sign app.
JNLP文件在 <j2se java-vm-args="-XX:MaxPermSize=128m -Xmx512m" version="1.5"/>
Edit 2: The JNLP file has alredy this code inside <j2se java-vm-args="-XX:MaxPermSize=128m -Xmx512m" version="1.5"/>
推荐答案
这是我要解决的问题;
Here is what I do to solve my issue;
- 卸载较旧的Java-如果有-(在我的情况下为1.5.0_14)
- 安装等于/高于1.7的Java以便在我的Web应用程序上运行电子签名
-
我准备了一个VBScript,以便仅按如下所示运行所需的jre版本,然后将jre1.5.0_14,jnlp文件和VBScript放在同一文件夹中,并为要运行的VBScript设置快捷方式.
- Uninstall the older Java -if there is- (in my case it is 1.5.0_14 )
- install java equal/higher than 1.7 just to run e-sign on my web application
I prepared a VBScript in order to just run the desired jre version as follows and put jre1.5.0_14, jnlp file and VBScript on the same folder and make shortcut to the VBScript to run.
设置oShell = WScript.CreateObject("WSCript.shell") oShell.run%comspec%/c D:\ TMS \ jre1.5.0_14 \ bin \ javaws.exe D:\ TMS \ tt.jnlp -verbose",1,真
Set oShell = WScript.CreateObject("WSCript.shell") oShell.run "%comspec% /c D:\TMS\jre1.5.0_14\bin\javaws.exe D:\TMS\tt.jnlp -verbose", 1, True
设置oShell = Nothing
Set oShell = Nothing
就这样:)
这篇关于如何强制在Java 1.5.0_14 JRE(而不是JRE 1.7)中打开JNLP文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!