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.

If you are using a Windows computer and want to run Java compiler and JVM by typing their program file name without the directory path name, you may need to update the "path" environment variable on your Windows computer:

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

herong> echo %path%


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

herong> javac

herong> java Hello
Hello world!

Now I am ready to play with Java Swing functionalities included in Oracle JDK package!

Adding JDK bin Directory to Path Setting
Adding JDK "bin" Directory to Path Setting

You can also 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

Table of Contents

 About This Book

JDK (Java Development Kit)

 What Is JDK

 Downloading and Installing JDK 15

 Writing My First Java Program

Adding JDK "bin" Directory to Path Setting

 JDK Documentation Installation

 Introduction of Java Swing Package

 Graphics Environment of the Local System

 JFrame - Main Frame Class

 JLabel - Swing Label Class

 JButton - Swing Button Class

 JCheckBox - Swing Check Box Class

 JRadioButton - Swing Radio Button Class

 JTextField - Swing Text Field Class

 JComboBox - Swing Combo Box Class

 Menu Bar, Menus, Menu Items and Listeners

 Creating Internal Frames inside the Main Frame

 Layout of Components in a Container

 LookAndFeel and UIManager

 Option Dialog Boxes

 JEditorPane - The Editor Pane Class

 SwingWorker - The Background Task Worker

 AWT (Abstract Windows Toolkit)

 Integration with Desktop System

 Archived Tutorials


 Full Version in PDF/EPUB