Adding JDK "bin" Directory to Path Setting

This section provides a tutorial on how to add JDK 'bin' directory to the 'path' system environment variable.

In order to run Java compiler and JVM by typing their program file name without the directory path name, I updated the "path" environment variable on my Windows computer:

Then I ran the "echo %path%" command in a new command window to confirm the change:

herong> echo %path%

C:\Progra~1\java\jdk-17.0.1\bin;
   C:\WINDOWS\system32;C:\WINDOWS;
   ...

Now I should be able to run Java commands without the directory path name:

herong> java -version
java version "17.0.1" 2021-10-19 LTS

I also want to set a new environment variable called "JAVA_HOME" to avoid typing the full path name to access Java tool program files:

herong> set JAVA_HOME=C:\Progra~1\java\jdk-17.0.1

herong> %JAVA_HOME%\bin\java -version
java version "17.0.1" 2021-10-19 LTS

I am ready to play with Java tools included in Oracle JDK package!

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

JDK (Java SE) Installation

 Downloading and Installing JDK

Adding JDK "bin" Directory to Path Setting

 Downloading and Installing JDK on Mac

 Downloading and Installing JDK on Linux

 Compile and Run Java Programs

 -cp or -classpath Syntax on Different Systems

 JDK Documentation Installation

 Microsoft SQL Server Express Edition

 Microsoft JDBC Driver for SQL Server

 Microsoft JDBC Driver - Query Statements and Result Sets

 Microsoft JDBC Driver - DatabaseMetaData Object

 Microsoft JDBC Driver - DDL Statements

 Microsoft JDBC Driver - DML Statements

 SQL Server - PreparedStatement

 SQL Server CLOB (Character Large Object) - TEXT

 SQL Server BLOB (Binary Large Object) - BLOB

 Using Connection Pool with JDBC

 JDBC-ODBC Bridge Driver - sun.jdbc.odbc.JdbcOdbcDriver

 JDBC-ODBC Bridge Driver - Flat Text Files

 JDBC-ODBC Bridge Driver - MS Access

 JDBC-ODBC Bridge Driver - MS SQL Server

 Archived Tutorials

 References

 Full Version in PDF/EPUB