As the two pictures show below, I've changed the variables in system. But don't know why it still doesn't work for java...
Asked
Active
Viewed 146 times
-3
-
You have added the Java path to the User variable but you need to add it to the System variable (You can see a variable named Path is already there, you just need to append your java path). – Amit Bera Feb 11 '18 at 09:29
-
have you set up your environment variables path? i'd suggest going through this: https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html – Salman Anjum Feb 11 '18 at 09:29
-
You have added the path to the jre, but you need the one to the jdk – Jorn Vernee Feb 11 '18 at 09:32
-
Seems you missed jdk path. You can set a `JAVA_HOME`, then let jre path and jdk path both direct to `JAVA_HOME`. http://www.runoob.com/java/java-environment-setup.html – xingbin Feb 11 '18 at 09:35
-
Setting JAVA_HOME is not mandatory to run a java program. However, it is recommended to set it. Setting path to "/jdk/bin " you just telling the system where javac , java, javap etc located – Amit Bera Feb 11 '18 at 09:40