Issue
When working with any command line (windows-cmd, git bash, ..), no Java commands are working.
I executed java -version
and nothing happens. I can type again.
I have set my JAVA_HOME
variable to C:/Users/myName/Java/jdk1.8
and I have also added %JAVA_HOME%\bin
to my Path
variable.
It's not, that the command does not get recognised. It's just that nothing happens.
I could probably run the java.exe
command directly, but I wanna fix the env variable.
Can someone help?
Best regards
Solution
Try this (Windows):
Locate your JDK/JRE binary - Usually the path for your JDK/JRE bin (On Windows) is:
Your OS Drive(C or D etc):\Program Files\Java\jdk[version]\bin. After you've located it, Copy your path to your clipboard.
Search for "Environment Variables" on windows.
Create a new User variable name it (usually named "JAVA_HOME") and copy your path as a value.
Now in System variables locate a variable named "Path" and add the same value set in JAVA_HOME.
Close and then reopen the CMD.
If this solution does not work, reinstall java. You can uninstall through:
Control Panel -> Programs -> Under Programs and Features -> Uninstall a program.
Answered By - InSaNiTy Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.