Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the home directory for JDK?

Tags:

java

I am having a problem in selecting home directory for JDK. Even though I have selected the following path: "C:\Program Files (x86)\Java\jre1.8.0_91", it keeps showing the error: "The selected directory is not a valid home for JDK". My java folder has two folders- bin and lib. Window for selecting home directory

Kindly help me in selecting home directory. Thank you!

like image 886
Akash Gupta Avatar asked Nov 08 '22 12:11

Akash Gupta


1 Answers

You have currently located a JRE, or Java Runtime Environment. That does indeed contain a java executable and can launch JVMs, but it's not made for development, rather more as a "Java client". For example if you look into it's /bin folder, you won't find the javac executable needed to compile.

What you need is a JDK, or Java Development Toolkit. It contains all the JRE contains, with additional tools for development. You can find it for download on the Oracle website.

like image 53
Aaron Avatar answered Nov 15 '22 13:11

Aaron