
Play Store Application link – https://play.google.com/store/apps/details?id=com.ideepro.java25hours
Learn with our youtube video –
Quick steps for all three operating systems for Java Installation-
Operating System | Installation Process |
---|---|
Windows | 1- Go to the Oracle website (https://www.oracle.com/java/technologies/javase-downloads.html) and click on the “Download” button for the JDK. 2- Accept the Oracle Binary Code License Agreement and click on the link to download the JDK installation file for Windows. 3- Save the downloaded file to a location on your computer, such as the desktop. 4- Double-click the downloaded installation file to launch the JDK installation wizard. 5- Click “Next” to begin the installation process. 6- On the “Custom Setup” page, you can choose the installation location and any additional components to install. The default options are usually sufficient for most users. Click “Next” to continue. 7- On the “Ready to Install” page, review the installation options and click “Install” to begin the installation process. 8- The installation process will take a few minutes to complete. When it’s done, the “Completing the JDK Setup Wizard” page will be displayed. 9- Click “Close” to exit the wizard and complete the installation. After installing the JDK, you may need to add it to your system path so that you can use it from the command line. To do this on Windows, you can follow these steps: Open the Start menu and search for “Environment Variables”. 10- Click on “Edit the system environment variables” to open the System Properties window. 11- Click on the “Environment Variables” button. Under the “System Variables” section, scroll down and find the “Path” variable. 12- Click on the “Edit” button to edit the variable. 13- In the “Edit Environment Variable” window, click on the “New” button and add the path to the JDK installation, such as “C:\Program Files\Java\jdk1.8.0_241\bin”. 14- Click “OK” to save the changes and close the window. |
Linux | 1. Download the JDK tar file from the Oracle website(https://www.oracle.com/java/technologies/javase-downloads.html). 2. Extract the tar file to the directory where you want to install the JDK. 3. Open a terminal and navigate to the bin directory within the JDK installation directory. 4. Run the command sudo alternatives --install /usr/bin/java java /path/to/jdk1.8.0/bin/java 20000 to set the default JDK. 5. Run the command sudo alternatives --install /usr/bin/jar jar /path/to/jdk1.8.0/bin/jar 20000 to set the default jar command. 6. Run the command sudo alternatives --install /usr/bin/javac javac /path/to/jdk1.8.0/bin/javac 20000 to set the default javac command. 7. Run the command sudo alternatives --set jar /path/to/jdk1.8.0/bin/jar to set the default jar command. 8. Run the command sudo alternatives --set javac /path/to/jdk1.8.0/bin/javac to set the default javac command. 9. Set the JAVA_HOME environment variable by adding the following line to your ~/.bashrc file: export JAVA_HOME=/path/to/jdk1.8.0 10. Run the command source ~/.bashrc to apply the changes to your current terminal session. |
macOS | 1- Go to the Oracle website (https://www.oracle.com/java/technologies/javase-downloads.html) and click on the “Download” button for the JDK. 2- Accept the Oracle Binary Code License Agreement and click on the link to download the JDK installation file for macOS. 3- Save the downloaded file to a location on your computer, such as the desktop. 4- Double-click the downloaded installation file to launch the JDK installer. 5- Click “Continue” to begin the installation process. 6- On the “Introduction” page, click “Continue” to proceed. 7- On the “License” page, review the license agreement and click “Agree” to continue. 8- On the “Installation Type” page, you can choose the installation location and any additional components to install. The default options are usually sufficient for most users. Click “Install” to begin the installation process. 9- Enter your password to allow the installer to make changes to your system. 10- The installation process will take a few minutes to complete. When it’s done, the “Install JDK” page will be displayed. 11- Click “Close” to exit the installer and complete the installation. On macOS, you can set the JAVA_HOME environment variable by adding the following line to your ~/.bash_profile file:12- export JAVA |
Detailed steps for all three operating systems-
π» Windows User 
1-Installation of java (java development kit)
Step 1:- Download the latest Java development kit (JDK) from oracle home site
A->Oracle Homepage (Click here)
B->Download the “Windows xxx Installer”

Step 2: Set the path (of tools) –
A- Path is required for using tools i.e. javac, java etc,
B- For setting path permanently, perform these steps->
C- * Go to My computer/This PC
‘properties’ -> ‘advanced system settings’
-> ‘Environment Variables ‘-> ‘New’
It should be like following:
“Variable name: path
“Variable Value: (path of bin folder of JDK) i.e. C:\Program Files\Java\jdkX.X._XX\bin

You are done !! Now to check whether installation is done correctly, type java -version in the Terminal.
You will see that java is running on your machine.
π» Linux User
Step 1- Go to Application -> Accessories -> Terminal.
sudo apt-get install openjdk-8-jdk
Or
Step 1:- Download the latest Java development kit (JDK) from oracle home site
A->http://www.oracle.com/technetwork/java/javase/downloads/index.html
B-> Switch tab to Linux
Note-change 8 in above line with current java version.
export JAVA_HOME = /usr/lib/jvm/java-8-openjdk
(Note: the default path is as shown, but if you have install OpenJDK at other location then set that path.)
export PATH = $PATH:/usr/lib/jvm/java-8-openjdk/bin
(Note: the default path is as shown, but if you have install OpenJDK at other location then set that path.)
You are done !! Now to check whether installation is done correctly, type java -version in the Terminal.
You will see that java is running on your machine.
π»Mac Users – How to Install JDK on macOS
- Goto JDK (or Java SE) download site @ https://www.oracle.com/java/technologies/javase-downloads.html.
- Under “Oracle JDK”, click “JDK Download”.
- Download the “macOS DMG installer” (e.g,
jdk-15.0.{x}_osx-x64_bin.dmg
– about 172MB, where{x}
is a fast changing update number).
- Double-click the downloaded Disk Image (DMG) file. Follow the screen instructions to install JDK/JRE.
- Eject the DMG file.
- To verify your installation, open a “Terminal” and issue these commands.
// Display the JDK version
javac -version javac 15.0.{x}
// Display the JRE version
java -version java version “15.0.{x}” .
// Display the location of Java Compiler which javac /usr/bin/javac
// Display the location of Java Runtime which java /usr/bin/java
2-Installation of IDE
There are many ide for development, but here are top in list, install any one-
(1)- Intelij
(2)- Eclipse
(3)- Netbeansinstallation process for Eclipse, NetBeans, and IntelliJ IDEA on Windows, Linux, and Mac:
IDE Windows Linux Mac Eclipse (Recommended/Free) 1. Download the Eclipse installer from the Eclipse website. 1. Download the Eclipse installer from the Eclipse website. 1. Download the Eclipse installer from the Eclipse website. 2. Run the installer and follow the prompts to install Eclipse. 2. Extract the downloaded file and run the Eclipse executable. 2. Double-click the downloaded Eclipse installer and follow the prompts to install Eclipse. NetBeans (Outdated/free) 1. Download the NetBeans installer from the NetBeans website. 1. Download the NetBeans installer from the NetBeans website. 1. Download the NetBeans installer from the NetBeans website. 2. Run the installer and follow the prompts to install NetBeans. 2. Extract the downloaded file and run the NetBeans executable. 2. Double-click the downloaded NetBeans installer and follow the prompts to install NetBeans. IntelliJ IDEA (Paid/Trials, Professional use) 1. Download the IntelliJ IDEA installer from the JetBrains website. 1. Download the IntelliJ IDEA installer from the JetBrains website. 1. Download the IntelliJ IDEA installer from the JetBrains website. 2. Run the installer and follow the prompts to install IntelliJ IDEA. 2. Extract the downloaded file and run the IntelliJ IDEA executable. 2. Double-click the downloaded IntelliJ IDEA installer and follow the prompts to install IntelliJ IDEA. Note that the installation process may vary depending on the specific version of the software and the operating system you are using. It is always a good idea to refer to the official documentation for the most up-to-date and accurate instructions.
3- FIRST java program –
1- Filename should be same as Class name (i.e FirstProg.java)
2- Class name must be start with Uppercase letter (i.e FirstProg (same as filename))
public class FirstProg {
public static void main(String[] args){
System.out.println("Yes It's working fine here");
}
}
public class FirstProg {
‘public’ Java modifier (Step – 8)
‘class’ is keyword (Step – 4)
‘FirstProg’ is user defined custom class name
‘{‘ is open curly bracket for group of code lines
public static void main(String[] args){
‘public’ Java modifier (Step – 8),
‘static’ Java modifier (Step – 8),
‘void’ is keyword which is used when we don’t return anything (String,int etc)
‘main’ is method name (JVM searches for method whose name is ‘main’ and executes it)
( ) after method name shows parameters
(String[] args) – we are passing String[] args as parameter to ‘main’ method,
String – It’s a class which is used as non primitive datatype in java, it’s used to support text data. (String a = ‘any text’)
String[] – [] is symbol used to show array, so String[] is array of Strings
i.e String[] b = [‘any text’, ‘some more’, ‘and more’]
args – It’s just a name declaration for String[] (just like ‘b’ in above example)-(you can use any name instead of args if you want to change)
System.out.println(“Yes It’s working fine here”);
System.out.println is way to print any text in console in java.
System – System is class in java.lang package(folder)
out – It’s a object of PrintStream class inside System class
println – It’s a method declared in PrintStream class
Interview Questions β
- What java component(JVM/JRE/JDK) to install for java development?
- Why to set path of bin folder in environment variables?