0

I have 2 different apps, one of them is a java desktop app and the other one is a c# web app. which uses java applet in order to e-sign. The problem is desktop java app requires 1.5.0_14 and on the other hand web app. requires 1.7 and higher version of java.

I installed both java 1.5 and 1.7 versions on my PC. In order to run desktop java app., I go to C:\Progra~2\Java\jre1.5.0_14\bin and run javacpl to disable 1.7 and enable 1.5. Then I make a shortcut to javaws 1.5.0_14 to my desktop and add the jnlp of this java app (http://abc/appclient/tt.jnlp) to the target of javaws shortcut. After those settings, the java desktop app. runs.

Now I needed to also run the web app which requires 1.7 java. In order to run this app. properly Java 1.5 should be disabled, 1.7 enabled on the Java Control Panel settings. Problem is when you run this web app. the settings for 1.5.0_14 break down, I mean all of the java versions become enabled in javacpl under C:\Progra~2\Java\jre1.5.0_14\bin directory. If I restart my PC, I need to reset the java versions. Is there a way to make this happen without pain in the head?

I would be so glad if you can help me.

By the way, I tried to use batch files, etc. but did not succeed. Is there a permanent solution?

UPDATED: Here is how I did it back then.

Here is what I do to solve my issue;

    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

Best Regards.

Thanks in advance.

raysefo
  • 45
  • 1
  • 10
  • For your client ("desktop") application you don't really need a Java 1.5 runtime "installed" - you can just copy/paste for example a JDK installation folder somewhere and otherwise completely uninstall it such that it disappears from any control panel and registry - and then boot the desktop application directly using the javaw.exe executable of the Java 5 JDK you copy/pasted somewhere. – Gimby Nov 28 '14 at 11:02
  • Java applications can use the java.exe/javaw from any installed Java directory. So a batch file should have worked. You could for instance install Java 8 on some PC, copy its directory to the target computer, and use that java to start a pure java 8 app. – Joop Eggen Nov 28 '14 at 11:04
  • Hi Gimby, thanks for your comment. I will definetly try and let you know. – raysefo Nov 28 '14 at 11:06
  • Hello Joop Eggen, so what you trying to say is I do NOT need to install 1.5 on my PC? Just copy the specific java folder on the PC and install 1.7 to run properly? – raysefo Nov 28 '14 at 11:08
  • *"desktop java app requires 1.5.0_14"* I Actually thought Oracle had dropped support for using an earlier version of Java, and especially one that is obsolete and might contain known security bugs. Try running the `1.5.0_14` app. in a modern JRE and see what breaks.. – Andrew Thompson Nov 29 '14 at 00:36
  • Hi Gimby, I tried to uninstall jre 1.5 but somehow it still remains under Java Control Panel settings. How can I totally get rid of this jre 1.5? – raysefo Dec 01 '14 at 14:26
  • @Gimby, I installed jre1.7 than jre1.5 and copy this folder somewhere. Than I uninstalled this jre1.5 but in java control panel it displays the copied jre1.5 folder. How can I fix this? – raysefo Dec 08 '14 at 15:34
  • I have no idea, I don't know what you exactly did and I am not an Oracle support employee. – Gimby Dec 09 '14 at 08:26
  • Here is the answer. https://stackoverflow.com/questions/27382032/how-to-force-to-open-jnlp-file-in-java-1-5-0-14-jre-instead-of-jre-1-7 – raysefo Jul 04 '17 at 08:29

0 Answers0