From the course: Java 8+ Essential Training: Syntax and Structure

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add Java to the system PATH on Windows

Add Java to the system PATH on Windows - Java Tutorial

From the course: Java 8+ Essential Training: Syntax and Structure

Start my 1-month free trial

Add Java to the system PATH on Windows

- [Instructor] When you install the Java Development Kit on Windows, the Java command, that is the Runtime Environment, is added to your system path automatically, but the compiler isn't. I'm going to type javac, that's the name of the compiler command, -version, and I'll get a Windows error message. The nature of the error message will differ, depending on whether you're working in PowerShell, as I am, or the standard command prompt. But either way, this is telling you that the compiler can't be found. To fix that, I'll go to my control panel. On Windows 10 I do that by going to the Start menu, and starting to type control panel, and then selecting it. Then I'll click into the search box and start typing the word environment. I'll click Edit environment variables for your account, and then I'll double click on the path variable. If it doesn't exist, I'll create it. My job is to add the location of my bin directory, that's the directory that contains the Java commands. You can find it…

Contents