Oracle JDK Installation to Java Development Environment Setup in One Go. (Window)
To develop programs in Java, you first need to install the JDK (Java Development Kit). There are two options available: Open JDK and Oracle JDK (both free to use).
1. Oracle JDK 23 Installation (Java)
First, visit the Oracle website.
JDK Folder Description
- bin: Contains the Java compiler (javac.exe) and the Java execution command (java.exe)
- conf: Stores configuration files that can be edited by Java developers, distributors, and end users
- include: Contains files necessary for integrating Java with programs written in C
- jmods: Stores compiled Java modules (standard libraries)
- legal: Stores copyright and license files
- lib: Contains detailed files related to the Java runtime environment
- Other files: Stores license and JDK release information
2. Java Development Environment Setup
Register the JAVA_HOME Environment Variable
The folder where JDK is installed (C:\Program Files\Java\jdk-23) is commonly referred to as JAVA_HOME. Since some programs use the JAVA_HOME environment variable to locate the installed JDK, it is advisable to create the JAVA_HOME environment variable and register the JDK installation folder.
Modify the Path Environment Variable
In File Explorer, you can see the JDK installation folder, which contains a bin folder. Inside the bin folder, there are various commands, including the javac command for compiling Java source files and the java command for executing compiled files.
The javac and java commands are used by developers to compile and execute directly from the command line of the Command Prompt (cmd.exe). The issue is that since they are located in the bin folder, they cannot be executed from other folders. To run them from other folders, you need to register the bin folder in the Path environment variable as follows.
%JAVA_HOME% means that it uses the value of the JAVA_HOME environment variable. Since JAVA_HOME is set to C:\Program Files\Java\jdk-23, %JAVA_HOME%\bin becomes C:\Program Files\Java\jdk-23\bin.
Check Environment Variable Configuration
Run Command Prompt (cmd.exe) to check if the environment variable is set correctly.
If the javac version is displayed, it means that the environment variable is set correctly.
More JAVA Informaion from Eunice0121…
https://eunice0121.com/category/java/
Java is a platform-independent, object-oriented programming language widely used across various fields. Its primary applications include web development, mobile applications, game development, and large-scale enterprise systems.
In web development, Java EE (Enterprise Edition) enables the creation of powerful server applications, while JSP (JavaServer Pages) and Servlets allow for easy creation of dynamic web pages. For mobile app development, Java is the primary language for the Android platform, which is one of the most widely used mobile operating systems globally.
Java’s stability and security make it a trusted choice in industries such as finance, telecommunications, and healthcare. Additionally, its rich libraries and frameworks (like Spring and Hibernate) significantly enhance development efficiency. In large-scale systems, Java excels in performance and scalability, allowing many enterprises to handle complex business logic effectively.
In conclusion, Java remains a popular programming language due to its versatility and robust ecosystem.