1.1 Getting Started
In order to teach you about java programming, we assume that you’ve done little or no programming in the past and you are using a machine running Windows.
What you need
- To write all our code, we’ll use Notepad, a simple editor included with the Windows platforms.
- In order to run Java programs, you must have the JRE (Java Runtime Environment). In order to write and run your own Java programs, you must have the JDK (Java Development Kit). The JDK includes the JRE, so you need to install JDK only.
Downloading and Installing JDK (Java Development Kit)
- To download JDK, the first thing you need to do is open internet browser. Once you have open browser type the url http://www.oracle.com/technetwork/java/javase/downloads/index.html
- It will open Java SE downloads page. Java SE stands for java standard edition. For software developement you need to downoad JDK.
- Now click on Java Icon it will open new page. Accept licence agreement and click on option according to your OS for example : for Windows 32bit user, download jdk-8u31-windows-i586.exe and for Windows 64bit user download jdk-8u31-windows-x64.exe.
- Once you download it, double click the executive file. Follow steps of wizards, once all done Java compiler is downloaded on your system.
Setting Path variable
- Open Windows explorer. Double Click on C:drive than Program Files, you will find Java Folder. Open It you will find two folder something like jdk1.8.0_25 and jre1.8.0_31.
- Double Click jdk1.8.0_25 folder and open bin folder copy the path from address bar that will something like C:\Program Files\Java\jdk1.8.0_25\bin.
- Open Control Panel ⇒ System ⇒ Advanced system settings
- In System Properties window click on Enviornment Variables…
- In Enviorment variables window, under System Variables, select path variable then click Edit.. button.
- Now Edit System Variable window will open, in the Variable value text field go to end, type semicolon; and then paste the path we have copied. Click Ok.
- Open cmd (commmand prompt) type javac if your screen should look like this java compiler is successfully installed.