Do I need to reboot the system after installing JAVA in the variable path to the system environment?

I took the following steps, but java doesn't seem to work for me, do I need to reboot my system, if so, why?

1. Right click My Computer->Advence Option->Environment Varibles->System Variables 2. variable : Path->Edit 3. Copy your jdk bin directory ieC:\Program Files\Java\jdk1.7.0_51\bin 4. Paste it after putting a semi-colon(;) in value section 

I get below errors when running java in cmd

 C:\Users\User>java -version Error: opening registry key 'Software\JavaSoft\Java Runtime Environment' Error: could not find java.dll Error: Could not find Java SE Runtime Environment. 
+7
java java-home
source share
6 answers

Reinstall the JDK and reinstall JAVA_HOME and PATH again. now it works.

0
source share

No, but you need to close and recreate any cmd windows, run java programs, etc.

To verify this correctly, open a new cmd window and enter set view information for PATH and JAVA_HOME .

+17
source share

Not necessary. Re-run the command line (if any) that starts the java process, and enter java -version to check if it was installed successfully.

+2
source share

You must establish two things:

  • JAVA_HOME
  • PATH

The first is in the "User Variables for [your username]" section. Add the JAVA_HOME variable and set it where your jdk is installed. i.e. C: \ Program Files \ Java \ jdk1.7.0_51 \

The second is in the System Variables section. You must find the path variable and edit it. Then add ";% JAVA_HOME% \ bin" (minus quotation marks) to the end of the path variable.

After you have done this, save the variables and close this window by clicking the "ok" button. Close all instances of the command line (and any IDE you can develop, such as Eclipse or NetBeans), and reopen one command line. Then, if you want to check if your changes worked or did not change, try the following:

 echo %JAVA_HOME% 

This should be output where you set the java home variable.

 echo %PATH% 

At the end of what is output, you should see your java home \ bin complement to the path variable

 java -version 

If you can run this command from the command line, it means that your environment has been configured correctly, and java is now in your path.

+1
source share

NOT.
You do not need to restart the system, but you just need to restart the application, for example cmd or any IDE that you use for java development (for example, Eclipse).

And to confirm that the java path is set that you mentioned in the JAVA_HOME environment variable, you can open cmd and you can check with the echo %JAVA_HOME% or echo %PATH% .

0
source share

No, you do not need to reboot the system. However, you need to restart the command line application to update the changes made to the environment variables.

0
source share

All Articles