Skip to Main Content

How to set different java versions for different apps. on a windows PC?

KızıldağDec 9 2014 — edited Dec 9 2014

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 breaks 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 a pain in the head?

I also uninstalled both jre versions and then install only jre1.7 than copied jre1.5.0_14 bin folder (NOT installed) to PC but still java control panel displays both jre versions!

I would be so glad if you can help me.

By the way, I tried to use batch files etc. but not succeded.

I didn't like the responses in my earlier post

https://community.oracle.com/thread/3634296

so I am trying to sneak this new post for my issue.  Any help please?

Best Regards.

Thanks in advance.

Comments
Post Details
Added on Dec 9 2014
0 comments
709 views