You are on page 1of 1

Downloading and Installing Java On Windows: Prevent Errors like --> 'javac' is not recognized as an internal or external com

mand 1. Go to http://java.sun.com and download the latest Version of Jave SDK or any Jace SDK as per your requirement and install on your system. 2. Accept all of the defaults and suggestions, but make sure that the location w here Java will be installed is at the top level of your C: drive. Click on "Finish." You should have a directory (fold er) named C:\j2sdk1.5.0_04, with subfolders C:\j2sdk1.5.0_04\bin and C:\j2sdk1.5.0_04\lib 4. Modify your system variable called "PATH" (so that programs can find where Ja va is located). To do this for Windows 2000 or XP, either right-click on the My Computer icon or select "System" on the control panel. When the window titled "System Properties" appears, choose the tab at the top na med "Advanced." Then, click on "Environment Variables." In the bottom window that shows system variabl es, select "Path" and then click on "Edit..." Add C:\j2sdk1.5.0_04\bin as the first item in the list. Note that all items are separated by a semicolon, with no spaces around the semicolon. You should end up with a path v ariable that looks something like C:\j2sdk1.5.0_04\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\Wbem For Windows 98 or ME, open the file AUTOEXEC.BAT in Notepad. You should find a l ine in this file that begins SET PATH=... Modify this line to add C:\j2sdk1.5.0_04\bin; immediately after the equals sign. 5. Modify or create a system variable called "CLASSPATH," as follows. In the low er "System Variables" pane choose "New..." and type in Variable Name "CLASSPATH" and value (note that it begins w ith dot semicolon) .;C:\j2sdk1.5.0_04\lib 6. To test Java to see if everything is installed properly, open a command windo w (a DOS window) and type the command "javac" The result should be information about the Usage of javac and it s options. If you get a result that "'javac' is not recognized as an internal or external command, operable pro gram or batch file" then there is a problem and Java will not work correctly.

You might also like