Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (1.5k points)
I have my JDK installed but while compiling i am getting errors

1 Answer

0 votes
by (1.4k points)

To set java_home on Windows 7 follow these simple steps: 

First you need to know the installation path for the Java Development Kit. 

Open the default installation path for the JDK: 

  • C:\Program Files\Java 

There will be a subdirectory like: 

  • C:\Program Files\Java\jdk1.8.0_172 

Set the JAVA_HOME Variable 

  1. Once you have the JDK installation path: 

  1. Right-click the My Computer icon on your desktop and select Properties. 

  1. Click the Advanced tab, then click the Environment Variables button. 

  1. Under System Variables, click New. 

  1. Enter the variable name as JAVA_HOME. 

  1. Enter the variable value as the installation path for the Java Development Kit. 

  1. Click OK. 

  1. Click Apply Changes. 

Related questions

Browse Categories

...