1

I used java 7 but now I need to use java 6.

I installed jdk 6 on my PC.

My cmd: shell

Why do I see java - version - 1.7 ?

What do I forgot made?

update for user2881767

enter image description here

update for TomaszDz

c:\>where java
C:\Windows\System32\java.exe
C:\Program Files\Java\jdk1.6.0_38\bin\java.exe
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

2 Answers2

2

Delete the java at C:\Windows\System32\java.exe

It should never have been unzipped at that directory, anyways. In fact, you should probably go ahead and delete everything else java-related in system32, java isn't a system binary.

TTT
  • 1,952
  • 18
  • 33
  • where does it come from there? – gstackoverflow Apr 01 '14 at 13:47
  • not sure what you mean, where does java come from? it comes from oracle, I guess. – TTT Apr 01 '14 at 13:49
  • How could java got into this folder ? – gstackoverflow Apr 01 '14 at 13:51
  • it had to have been installed there by something or someone – TTT Apr 01 '14 at 13:51
  • 1
    I single user of this workstation. Only I can use this PC. Thus I installed java to this folder. But I am sure that I don't make it – gstackoverflow Apr 01 '14 at 14:06
  • ok, so you installed java to your system32 folder. I would HOPE that you didn't make that folder, it should already exist, it contains binaries critical to the functioning of your windows OS :) – TTT Apr 01 '14 at 14:10
  • I removed only java.exe javaw.exe and 1 more file – gstackoverflow Apr 01 '14 at 14:15
  • That's fine, the only file you needed to remove was java.exe anyways, because it took precedence on your environment PATH. I would remove javac, too, though, you don't want that to accidentally conflict. – TTT Apr 01 '14 at 14:18
  • I tryed to type **where java** from pc my colleagues and everyone has java in **windows/system32** but everyone doesn't know how it installed there – gstackoverflow Apr 01 '14 at 14:39
  • This seems to be a corporate PC. It is standard for corporate IT departments to have a windows imaging system so that every computer has the same exact installation of windows out of the box. In any case the JRE and its dependencies should not be in system32, it just causes confusion in the long run when you want to switch java versions. – TTT Apr 01 '14 at 14:46
  • I try to check it at home. – gstackoverflow Apr 01 '14 at 14:53
  • At home I see same situation – gstackoverflow Apr 01 '14 at 17:30
  • then the java installer probably puts the executables inside of system32 for convenience of use from the shell(doesnt need to modify PATH in order to access java.exe) , but when you updated java you probably just updated your c:/program files/java to the latest version manually and did not update those convenience binaries. this is not of significance.. if you need to switch between java versions the EASIEST way is to only have your java.exe for a certain version located in its own directory, that way you can change your PATH to each bin folder without confusion. – TTT Apr 01 '14 at 17:36
-1

You need to set class path as ClassPath=JAVA_HOME/bin. Check version of Java being picked after setting classpath.

user2881767
  • 190
  • 8