install java SE development kit windows

Java development SE kit is important to develop applications, applets, and components using Java programming language. The JDK includes also includes the tools useful for testing programs written in Java and running on the Java platform. In this tutorial, we shall loom into the step-by-step process of installing JDK on the Windows system, and also look at the method of setting an environment variable that lets you run Java using the command-line.

Installing Java SE Development Kit on Windows

Step 1: Navigate to the following link to download Java on Windows, Linux, and macOS.

Step 2: To install JDK on Windows, scroll through the page and click on the download link as shown in the picture.

Click on jdk-15.0.2_windows-x64_bin.exe

Step 3: After clicking the windows installer link a ‘Terms and Condition’ prompt will appear. To download JDK you need to accept by clicking the checkbox. and click on the green button.

The software will ask for an appropriate directory to download and then start downloading the .exe file.

Step 4: When the download is finished, run the .exe file. A prompt will appear that suggests that the software will make changes to your windows. Click ‘allow’ to proceed.

When you proceed further, the JDK setup prompt appears as shown.

click Next

Step 5: When you click next you see another prompt showing the program file directory where java will installed.

Step 6: You can also change the destination by clicking Change. A progress of Java installation will be displayed as in the picture.

Status of installation

Step 7: After the installation has been completed you can click the close button on the bottom right corner.

Step 8: To access the API (Application Programming Interface) and developer guides you can click Next Steps or you can also visit this link https://www.oracle.com/java/technologies/javase-downloads.html

This provides an in-depth narrative of java and how to use JDK. Now to compile our first program on the command line. So let’s write a sample program.

public class Hello {  
   public static void main(String[] args) {
      System.out.println("Hello world!");
   }

This program can easily be executed through the command line. Firstly, we need to check our java version, in case we don’t know. We can type the following command.

javac -version
// The command line will display the java version as Java 15.0.2

We first navigate our working directory to run our program, where we have saved the Hello.java file. After that, we invoke the following command to compile the code.

javac Hello.java

To run the code we invoke:

java Hello

After this command executes Hello world will be displayed on the command line.

How to set Environment Variables in Java: Path and Classpath

To run Java programs through the command line, we need to set up the environment variables. Navigate to Windows search and type ‘advanced system settings’.

System Properties

Click on ‘Environment Variables’. The environment variables section will appear, click ‘new’ and then ‘browse directory’ and set up the path.

system variables

Next, we update the system path.

system path

IDE (Integrated Development Environment)

An integrated development environment consists of a text editor, compiler, debugger, and other utilities to help the programmer compile the code easily. Usually, several commands need to be run to execute the code, and the results are on the command line only, but with the use of IDE, the programmer has a better interface to communicate with.

In this tutorial, we will discuss how to install the IntelliJ IDEA community version on windows. There is an installation guide on this link that highlights the minimum and the recommended system requirement.

  • The installation process is simple. First, we can download the installer .exe file. https://www.jetbrains.com/toolbox-app/.
  • Then we click on the .exe file and follow the wizard steps.
  • When we reach installation options, there are a few options that need to be configured.

In installation options, tick 64-bit launcher, Add “Open Folder as Project,”, select “.Java”, and finally click on “Add launchers dir to PATH”.

Conclusion

Installation of the language and its frameworks are an important step in development. If you don’t have the right tool, you will probably struggle to develop the application swiftly. This tutorial provides basic insights into installation and development in Java.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *