Java TUTORIAL for beginners

This tutorial is intended for beginners who wish to learn Java.

Before you can start learning Java , you need to set up environment on your computer so that you can compile and run your java program. To start - download the latest version of Java Developer kit from the Oracle website ( opens in a new tab). If you are wondering why from Oracle website, then you need to go a bit into history. Java was orginally developed by Sun Microsystem which was later acquired by Oracle. All the downloads have since then been ported to Oracle website. Once you are on this webapage click on link that says - Please visit our Java SE download page to get the latest version of the JDK. Once you are on that page click on the first square image link that says "Java EE with JDK". This is how it looks like

The download installs the Java Developer Kit or JDK for short.

This tutorial has been presented assuming that you wish to install the jdk on Windows 7. The material should be similar for Linus and MAC versions.

The jdk-7u17-windows-x64.exe is a 90.4 MB file and takes a while to download, so keep reading this tutorial while the download and install takes place. Notice that over the period of time you will get more updated version. So intalled the latest version available. This version was checked in April 2013.

If you miss anything in the installation step, you may like to check this youtube

Originally developed by James Gosling at Sun Microsystems, Java is a programming language that derives much of its syntax from C and C++, but has fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture. Hence you see Java on Desktops, Android phones, Tablets and on varying Operating Systems, Microsoft, Mac OS, iOS , Linux and other. Java has been designed to have as few implementation dependencies as possible. Java has been designed to "write once, run anywhere"

By default this JDK is installed into C:\Program Files\Java\jdk1.7.7\bin or something similar, depending upon which version you are installing. A later version, 1.7.9, for example may have the default director structure C:\Program Files\Java\jdk1.7.9\bin.

Your installation is almost complete. We are saying "almost" because you still need to set a path. But before we worry about that, we will first write a Hello World program. This is someting we will deal with in the next chapter.