To get started we need the following items to be available
1. JAVA SE
2. JAVA JDK
3. Operating System
4. System configuration
5. A programming workplace or IDE (I am going to Use Netbeans feel free to use your choice of IDE, the code should work the same)
To download Netbeans package along with JDK from here:
1. JAVA SE
2. JAVA JDK
3. Operating System
4. System configuration
5. A programming workplace or IDE (I am going to Use Netbeans feel free to use your choice of IDE, the code should work the same)
To download Netbeans package along with JDK from here:
After clicking the above link, you will get a page that looks like this and then you have to click on the netbeans with jdk to download the Software :
After downloading and installing Netbeans, the IDE will look like this and you are ready to go to write your first program
Configuring Execution Path : An execution path is the location or directory in which the commands to execute a program are stored. For example,
C:\Program Files\Java\jdk1.7.045\bin
Whenever you are trying to run a program, the operating system will look for this path, and it must be included in the system variable of the OS like windows.
If any problems occur in the future while compiling your program, you can follow these steps to configure the path manually in Windows OS.
You can use the Windows search command to locate and identify the directory where the package is stored:
1. Enter keyword “Java” in the search file or folder.
2. Open the Java folder you have found by the search. Find the folder with JDK version number and open it.
3. Find the bin folder and open it.
4. Copy the entire address in the address field located at the top of the window. This address is the execution path.
For Example, if we have installed the JDK here :
C:\Program Files(x86)\jdk1.7.045\
then our execution path would be :
C:\Program Files(x86)\jdk1.7.045\bin;
Now, follow the steps to include this path to the system variable :
C:\Program Files\Java\jdk1.7.045\bin
Whenever you are trying to run a program, the operating system will look for this path, and it must be included in the system variable of the OS like windows.
If any problems occur in the future while compiling your program, you can follow these steps to configure the path manually in Windows OS.
You can use the Windows search command to locate and identify the directory where the package is stored:
1. Enter keyword “Java” in the search file or folder.
2. Open the Java folder you have found by the search. Find the folder with JDK version number and open it.
3. Find the bin folder and open it.
4. Copy the entire address in the address field located at the top of the window. This address is the execution path.
For Example, if we have installed the JDK here :
C:\Program Files(x86)\jdk1.7.045\
then our execution path would be :
C:\Program Files(x86)\jdk1.7.045\bin;
Now, follow the steps to include this path to the system variable :
1. Click on Start menu. In Control Panel, double click on System.
2. In System Properties, click on Advanced, then Environment Variables, as shown in Figure
3. In System Environment dialog box, select Path, then press Edit, as shown in Figure
4. In the pop-up window of System Environment Variable, click on Variable field, and move the cursor to the end of existing path.
5. Enter ;C:\Program Files(x86)\Java\jdk1.7.045\bin; at the end of the field. Note: The beginning and ending semi-colons “;” are required.
6. Press the OK button three times to complete your configuration of the execution path.
Note: The steps may vary if the version of the operating system is different.
Test if the execution Path is working
1. Click Start menu -> Programs -> Accessories -> Command Prompt and get into the operating system window.
2. Type the following command: java
If your path is working then you will get the following screen:
2. In System Properties, click on Advanced, then Environment Variables, as shown in Figure
3. In System Environment dialog box, select Path, then press Edit, as shown in Figure
4. In the pop-up window of System Environment Variable, click on Variable field, and move the cursor to the end of existing path.
5. Enter ;C:\Program Files(x86)\Java\jdk1.7.045\bin; at the end of the field. Note: The beginning and ending semi-colons “;” are required.
6. Press the OK button three times to complete your configuration of the execution path.
Note: The steps may vary if the version of the operating system is different.
Test if the execution Path is working
1. Click Start menu -> Programs -> Accessories -> Command Prompt and get into the operating system window.
2. Type the following command: java
If your path is working then you will get the following screen: