M HYPE SPLASH
// updates

javac path setup windows 10 [duplicate]

By Andrew Adams

I'm trying to return to java programming on a new computer. I have JDK installed, but when I try to compile with javac it tells me:

'javac' is not recognized as an internal or external command, operable program or batch file.

I understand this may mean I have to set up the path so that windows can find the compiler, but I have no idea how to do that (the oracle guide I found goes up to windows 7, but I have windows 10)

0

1 Answer

Windows 10 is very similar to Windows 7 in terms of setting up environment variables.

In Windows 10:

  1. Click This PC (rather than My Computer).

  2. From the left side of the System window, choose the Advanced System Settings link.

  3. In the System Properties dialog box, click the Advanced Tab and then press the Environment Variables... button.

  4. For javac, you will likely want to highlight your Path variable (under System variables), then Edit it and add an entry like C:\Program Files\Java\jdk_x.x.x\bin to the list (since the bin folder is where javac.exe typically resides).

Note that you will need to use the actual path to your JDK installation.