我有 2 个不同的应用程序,其中一个是 a java desktop app
,另一个是c# web app
. 用于java applet
电子签名。问题是desktop java app requires 1.5.0_14 and on the other hand web app. requires 1.7
更高版本的java。
我在我的电脑上java 1.5
安装了这两个版本。1.7
为了运行桌面 java 应用程序,我去C:\Progra~2\Java\jre1.5.0_14\bin
并运行javacpl
以禁用 1.7 并启用 1.5。然后我创建一个javaws 1.5.0_14
到我的桌面的快捷方式,并将这个 java 应用程序的 jnlp ( http://abc/appclient/tt.jnlp
) 添加到 javaws 快捷方式的目标。在这些设置之后,java 桌面应用程序。运行。
现在我还需要运行需要1.7 java 的网络应用程序。为了运行这个应用程序。正确的 Java 1.5 应该被禁用,在 Java 控制面板设置中启用 1.7。问题是当您运行此 Web 应用程序时。1.5.0_14 的设置坏了,我的意思是所有的 java 版本都在 javacpl 下启用C:\Progra~2\Java\jre1.5.0_14\bin directory
。如果我重新启动我的电脑,我需要重置 java 版本。有没有办法让这种情况发生而不会使头部疼痛?
如果你能帮助我,我会很高兴。
顺便说一句,我尝试使用批处理文件等但没有成功。有永久的解决方案吗?
更新: 这是我当时的做法。
这是我解决问题的方法;
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.
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
Set oShell = Nothing
此致。
提前致谢。