1

When I set path C:\Windows\System32, the ipconfig command works, but javac and java -version commands don't work.

While, when I set path variable to C:\Program Files\Java\jdk-14.0.1\bin they work, but ipconfig command stops working.

How can I solve it in order to make work both the commands?

xKobalt
  • 1,478
  • 2
  • 11
  • 19

2 Answers2

1

Welcome to SO.

You can extend your PATH variable with additional directories instead of replacing it.

See also: Adding a directory to the PATH environment variable in Windows

tpschmidt
  • 1,433
  • 1
  • 10
  • 19
  • 1
    Thanks for your response,i tried adding path1 C:\Program Files\Java\jdk-14.0.1\bin and path2 C:\Windows\System32 it is working now .Is it correct? – Mamoon pandit Jul 17 '20 at 07:46
0

Add both the folders to path variable seperated by ';' eg

PATH1;PATH2
Vishal T
  • 55
  • 6
  • thanks for your response ,i tried doing it but it didn't work ,i tried adding path1 C:\Program Files\Java\jdk-14.0.1\bin and path2 C:\Windows\System32 it is working now .Is it correct? – Mamoon pandit Jul 17 '20 at 07:52
  • you need to set your path variable to C:\Program Files\Java\jdk-14.0.1\bin;C:\Windows\System32 – Vishal T Jul 17 '20 at 08:04