Java Reference
In-Depth Information
Correcting Configuration Errors
When you are writing Java programs for the first time, the most likely source for prob-
lems is not typos, syntax errors, or other programming mistakes. Most errors result from
a misconfigured kit.
A
If you type java -version at a command line and your system can't find the folder that
contains java.exe , you will see one of the following error messages or something simi-
lar (depending on your operating system):
n
Bad command or file name
n
'java' is not recognized as an internal or external command, opera-
ble program, or batch file
To correct this, you must configure your system's PATH variable.
Setting the PATH on Windows 98 or Me
On a Windows 98 or Me system, you configure the PATH variable by editing the
AUTOEXEC.BAT file in the root folder of your main hard drive. This file is used by MS-
DOS to set environment variables and configure how some command-line programs
function.
AUTOEXEC.BAT is a text file you can edit with Windows Notepad. Start Notepad by choos-
ing Start, Programs, Accessories, Notepad from the Windows taskbar.
The Notepad text editor opens. Choose File, Open from Notepad's menu bar, go to the
root folder on your main hard drive, and then open the file AUTOEXEC.BAT .
When you open the file, you'll see a series of MS-DOS commands, each on its own line,
as shown in Figure A.6.
PAT H command
FIGURE A.6
Editing the
AUTOEXEC.BAT file
with Notepad.
Search WWH ::




Custom Search