Monday 22 November 2010

Installing the Java Development Kit (JDK)



Nota Bene: This write-up is about installing the JDK 6 in Windows Vista. JDK 7 is scheduled to be released on 28 July 2011. 


1. Go to http://java.sun.com

2. Click Downloads > Java SE



3. Select the latest version of Java Platform, Standard Edition (say, JDK 6 Update 19) and download the JDK


4. Install the downloaded binary file (it could be something like jdk-6u19-windows-i586.exe) in the Program Files directory. Post installation, the Java folder should show in the C:\Program Files directory


5. Now click the Start button and open the Start menu. In the right pane, right click on Computer > Properties > Advanced system settings 





6. In the Advanced tab, click the Environment Variables... button

7. Create a new user variable by clicking the New... button



8. In the Variable name field write Path


9. In the Variable value field write C:\Program Files\Java\jdk 1.6.0_19\bin


Now if you click Program Files > Java > jdk1.6.0_21 > bin, you'll find the following programming tools:



     appletviewer: This tool lets you debug and run Java applets without a web browser
     java: This tool is the interpreter, the loader for Java applications
     javac: The compiler which converts source code into intermediate Java bytecode
     javadoc: The documentation generator in HTML format
     javah: The C header and stub generator for writing native methods
     javap: This tool is the disassembler which converts bytecode files into a program description


     ...
     ...


10. Open the Start menu and click the Run command (or press Windows key + R)


11. In the Open field type cmd


12. Click the OK button


13. At the command prompt type javac and press Enter



The following will appear in the command window



You're ready to run your first Java program

No comments:

Post a Comment