Configuring the Software Development Kit

When you are writing and compiling Java programs for the first time, the most likely source for problems is not typos, syntax errors, or other programming mistakes.

Most errors result from a misconfigured Software Development Kit.

If you type java -version at a command line and get a Bad command or file name error or a similar error, it indicates that your system can't find the folder that contains java.exe, the Java interpreter.

Setting Up the PATH Command

The root folder of your Windows system should contain a file called AUTOEXEC.BAT. This file is used by MS-DOS to configure how the operating system and some command-line programs function.

AUTOEXEC.BAT is a text file you can edit with Windows Notepad. ...

Get Sams Teach Yourself Java 2 in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.