Definition for JDK,JRE,JVM,JIT
Source: Dev.to
01. How to download the JDK?
- Open the command prompt.
- Run
java --versionand press Enter. - If the JDK is installed, the version will be displayed.
- If the command is not recognized, download and install the JDK from the official Oracle (or OpenJDK) website.
02. How to write a Java program using Notepad?
- Open Notepad (or Notepad++).
- Write your Java code.
- Save the file with a
.javaextension (e.g.,HelloWorld.java).
03. How to set the command‑prompt path
-
Open the terminal or Command Prompt.
-
Navigate to the folder containing your source file, e.g.:
cd Desktop -
If the path is not set correctly, locate the folder in Explorer, copy its full path, and use:
cd "C:\Path\To\Your\Folder" -
Once the correct directory is set, you can compile and run the program.
04. How to compile and run the Java program using the command prompt
-
Open the terminal or Command Prompt and change to the directory where the
.javafile resides. -
Compile the source file:
javac HelloWorld.java -
Run the compiled class:
java HelloWorld
You should see the program’s output in the console.
05. Software for Java development
- Eclipse IDE
- Visual Studio Code
- IntelliJ IDEA
06. What is the JDK?
- JDK = Java Development Kit
- A software development kit used to write, compile, and run Java programs.
- Converts
.javasource files into.classbytecode files.
07. What is the JRE?
- JRE = Java Runtime Environment
- Provides the runtime environment (memory, libraries, etc.) required to run compiled Java programs.
- Utilizes the JVM to execute bytecode.
08. What is the JVM?
- JVM = Java Virtual Machine
- Executes Java bytecode on any platform that has a compatible JVM implementation.
- Every time you run a Java program, the JVM loads and runs the bytecode.
09. What is JIT?
- JIT = Just‑In‑Time Compiler
- Compiles parts of the bytecode to native machine code at runtime, improving performance.
- Operates automatically inside the JVM.