0

I am stuck with the following problem regarding Intellij IDEA. I had installed the following java version:

java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)

on my Win7 PC and using Intellij IDEA v14.1.3. After some time, I have upgraded my jdk and now I have installed the following:

java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

I have consequently changed all the references to point to the new jdk in system variables and in Intellij in Project structure ...

Everything seemed to work fine (when I run a program from Intellij I see that the command java is invoked from the right path).

The problem is that for some reasons, when I open the integrated terminal in Intellij and write java -version the result is the old version (1.7.0_51).

I realized this because of some issues of the old version of java I face when I run my unit tests that should have been resolved in the new version.

Have anybody any idea how to solve this?

Thank you in advance!

Paolo
  • 1,641
  • 11
  • 15

1 Answers1

1

I would not only update the java version, but completely delete it from the machine. Obviously, you have not removed all the references to the old java, as your problem statements describes.

Maybe the Java Uninstall tool might be helpful for this? Then make a clean new installation.

mana
  • 6,347
  • 6
  • 50
  • 70
  • Thank you for your answer. Of course this could be a solution, reset and reinstall ... But I would like to know why this is happening. – Paolo Jun 24 '15 at 08:33
  • Some creepy things that stays in the Windows Registry maybe. Some Global Variables for either the system or your user. Like this: http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7 – mana Jun 24 '15 at 09:20
  • I have also checked the Window Registry, but I haven't solved my problem yet. Sorry mana but my I cannot accept your answer as right... – Paolo Jun 30 '15 at 22:38