I\'ve JDK 1.7 installed on my windows 7 machine and after installing JDK 1.8 u20 I\'m having following error:
C:\\>java -version
Error: Registry key \'Sof
You can't have your cake and eat it too. :) When you set your PATH variable to JDK 1.8, The problem should resolve. You can run your programs in JDK 1.7 by setting PATH manually using set PATH from command prompt or can go to the JDK 1.7 directory and run your program from there. But there can be only one JDK in your PATH.