Skip to content

Santhosh Ponnam

Technology Blog

  • Home
  • About
  • Technology
    • Java
    • ORM
  • Privacy Policy
  • Toggle search form
  • Why to have a private constructor? Java
  • HikariCP Configurations – Database Connection Pooling Installations and Configurations
  • hashCode and equals methods in java Java
  • Fixing Log4j Vulnerability Java
  • HikariCP Connection Pooling for Spring Boot for 1.x version Spring Boot
  • Windows Commands – kill port number Installations and Configurations
  • Another Log4j Bug – DoS Java
  • Unique Random ‘N’ digit Number generator Java
  • Why to have a private constructor? Java
  • HikariCP Configurations – Database Connection Pooling Installations and Configurations
  • hashCode and equals methods in java Java
  • Fixing Log4j Vulnerability Java
  • HikariCP Connection Pooling for Spring Boot for 1.x version Spring Boot
  • Windows Commands – kill port number Installations and Configurations
  • Another Log4j Bug – DoS Java
  • Unique Random ‘N’ digit Number generator Java

Setting Environment Variables in Windows

Posted on August 2, 2016August 12, 2021 By Santhosh Ponnam

Why do I need to set JAVA_HOME?

Many Java based programs like Tomcat require JAVA_HOME to be set as environment variable to work correctly. Please note JAVA_HOME should point to a JDK directory not a JRE one. The point of setting the environment variable is to let programs know in which directory executables like javac can be found.

1. Open Advanced System Settings

In Windows 10 press Windows key + Pause Key, This will open the System Settings window. Go to Change settings and select the Advanced tab.

2. Set JAVA_HOME Environment variable

In “System Properties window” click “Environment Variables…”system properties window environment variablesUnder “System variables” click the “New…” button and enter JAVA_HOME as “Variable name” and the path to your Java JDK directory under “Variable value”Add JAVA_HOME as system variable

3. Update System PATH

1. In “Environment Variables” window under “System variables” select Path2. Click on “Edit…”3. In “Edit environment variable” window click “New”4. Type in  %JAVA_HOME%\binUpdate system path

4. Test your configuration

Open a new command prompt and type in:

  1. echo %JAVA_HOME%

this will print out the directory JAVA_HOME points to or empty line if the environment variable is not set correctlyNow type in:

  1. javac -version

this will print out the version of the java compiler if the Path variable is set correctly or “javac is not recognized as an internal or external command…” otherwiseTest JAVA_HOME and system path

Java Tags:Java Environment Windows

Post navigation

Next Post: Unique Random ‘N’ digit Number generator

Related Posts

  • Why to have a private constructor? Java
  • Unique Random ‘N’ digit Number generator Java
  • Log4J (RCE) Vulnerability Java
  • hashCode and equals methods in java Java
  • Log4j Vulnerability / Version Upgrade to 2.16.0 by Apache Team Java
  • Another Log4j Bug – DoS Java
  • Why to have a private constructor? Java
  • Unique Random ‘N’ digit Number generator Java
  • Log4J (RCE) Vulnerability Java
  • hashCode and equals methods in java Java

Recent Posts

  • Consent Management – DPDP
  • Another Log4j Bug – DoS
  • Log4j Vulnerability / Version Upgrade to 2.16.0 by Apache Team
  • Fixing Log4j Vulnerability
  • Log4J (RCE) Vulnerability

Categories

  • Installations and Configurations
  • Java
  • ORM
  • Spring Boot
  • Spring Boot HikariCP Connection Pooling

Archives

  • June 2025
  • December 2021
  • August 2021
  • November 2020
  • March 2020
  • August 2018
  • November 2016
  • August 2016

Recent Posts

  • Consent Management – DPDP
  • Another Log4j Bug – DoS
  • Log4j Vulnerability / Version Upgrade to 2.16.0 by Apache Team
  • Fixing Log4j Vulnerability
  • Log4J (RCE) Vulnerability

Categories

  • Installations and Configurations
  • Java
  • ORM
  • Spring Boot
  • Spring Boot HikariCP Connection Pooling

Archives

  • June 2025
  • December 2021
  • August 2021
  • November 2020
  • March 2020
  • August 2018
  • November 2016
  • August 2016




Recent Posts

  • Consent Management – DPDP
  • Another Log4j Bug – DoS
  • Log4j Vulnerability / Version Upgrade to 2.16.0 by Apache Team
  • Fixing Log4j Vulnerability
  • Log4J (RCE) Vulnerability

Categories

  • Installations and Configurations
  • Java
  • ORM
  • Spring Boot
  • Spring Boot HikariCP Connection Pooling
  • Why to have a private constructor? Java
  • HikariCP Configurations – Database Connection Pooling Installations and Configurations
  • hashCode and equals methods in java Java
  • Fixing Log4j Vulnerability Java
  • HikariCP Connection Pooling for Spring Boot for 1.x version Spring Boot
  • Windows Commands – kill port number Installations and Configurations
  • Another Log4j Bug – DoS Java
  • Unique Random ‘N’ digit Number generator Java
  • Why to have a private constructor? Java
  • HikariCP Configurations – Database Connection Pooling Installations and Configurations
  • hashCode and equals methods in java Java
  • Fixing Log4j Vulnerability Java
  • HikariCP Connection Pooling for Spring Boot for 1.x version Spring Boot
  • Windows Commands – kill port number Installations and Configurations
  • Another Log4j Bug – DoS Java
  • Unique Random ‘N’ digit Number generator Java

Copyright © 2025 Santhosh Ponnam.

Powered by PressBook News WordPress theme