Jump to content

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.


Flaghacker

Recommended Posts

I reinstalled java on my computer, and now "gradlew clean" is giving the following error message:

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

 

I created a JAVA_HOME environment variable and added both the jdk and jre to the path variable. Typing "java -version" in cmd outputs this: N3vqKCx.png.

 

Can someone help me?

Link to comment
Share on other sites

I reinstalled java, but now Idea (my IDE) is error when trying to run the minecraft client:

Error:Cannot run program "D:\Program Files\Java\jdk1.8.0_11\bin\java" (in directory "C:\Users\Karel\.IdeaIC13\system\compile-server"): CreateProcess error=2, Het systeem kan het opgegeven bestand niet vinden

 

I can't find a way to tell Idea that java is not installed in "D:\Program Files\Java\jdk1.8.0_11\bin\java", but in "D:\Install\Java\jdk1.7.0_67\bin\java".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.