close

[Solved] JAVA_HOME should point to a JDK not a JRE

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing following error JAVA_HOME should point to a JDK not a JRE in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How JAVA_HOME should point to a JDK not a JRE Error Occurs ?

I am facing following error.

JAVA_HOME should point to a JDK not a JRE

How To Solve JAVA_HOME should point to a JDK not a JRE Error ?

  1. How To Solve JAVA_HOME should point to a JDK not a JRE Error ?

    To Solve JAVA_HOME should point to a JDK not a JRE Error Just Add Environment Variable Go to Control Panel -> System and Security -> System -> Advanced system settings -> Advanced -> Environment Variables -> New System Variable Add Variable Name: JAVA_HOME Add Variable Value: C:\Program Files\Java\jdk1.8.0_121\ ( In your case It Might be different ) Now, Your error must be solved.

  2. JAVA_HOME should point to a JDK not a JRE

    To Solve JAVA_HOME should point to a JDK not a JRE Error Just Add Environment Variable Go to Control Panel -> System and Security -> System -> Advanced system settings -> Advanced -> Environment Variables -> New System Variable Add Variable Name: JAVA_HOME Add Variable Value: C:\Program Files\Java\jdk1.8.0_121\ ( In your case It Might be different ) Now, Your error must be solved.

Solution 1: Add Environment Variable

Just Add Environment Variable Go to Control Panel -> System and Security -> System -> Advanced system settings -> Advanced -> Environment Variables -> New System Variable

Add Variable Name: JAVA_HOME
Add Variable Value: C:\Program Files\Java\jdk1.8.0_121\ ( In your case It Might be different )

Now, Your error must be solved.

Solution 2: Run this command in cmd

Just Run this command in cmd.

echo %JAVA_HOME% set set JAVA_HOME=C:\Program Files\Java\jdk1.8.0 echo %JAVA_HOME%

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment