multiple java versions how to set appropriate one?
posted 2 years ago
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 to the target of javaws shortcut. After those settings, the java desktop app. runs.
Now I need 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 would be so glad if you can help me.
By the way, I tried to use batch files etc. but not succeded. Is there a permanent solution?