📘 Premium Read: Access my best content on Medium member-only articles — deep dives into Java, Spring Boot, Microservices, backend architecture, interview preparation, career advice, and industry-standard best practices.
✅ Some premium posts are free to read — no account needed. Follow me on Medium to stay updated and support my writing.
🎓 Top 10 Udemy Courses (Huge Discount): Explore My Udemy Courses — Learn through real-time, project-based development.
▶️ Subscribe to My YouTube Channel (172K+ subscribers): Java Guides on YouTube
Key Features of JDK:
JavaDoc: Generates documentation from code comments.
Debugger: Helps in fixing errors in your code efficiently.
2. JRE(Java Runtime Environment)
The JRE is what you need to run Java applications. It's a part of the JDK but can also be distributed separately to run Java applications. The JRE consists of the JVM, core libraries, and other components to run applications written in Java. However, it doesn't include development tools like compilers or debuggers.What's in the JRE?
Core libraries: Provide essential functionalities to Java applications.
Deployment technologies: Java Web Start is used to deploy standalone applications over a network.
3. Java Virtual Machine (JVM)
The JVM is an abstract computing machine that enables a computer to run a Java program. When you run a Java application, the JVM reads the compiled bytecode (generated by the JDK) and interprets it into machine code for execution. The JVM ensures Java applications can run on any device or operating system that has a compatible JVM, embodying Java's write-once, run-anywhere principle.JVM's Roles:
Verifies code: Ensures the code is properly formatted and secure to execute.
Executes code: Translates bytecode into machine language.
4. Differences Between JDK, JRE and JVM
JDK (Java Development Kit)
Components: Includes the Java Runtime Environment (JRE), a compiler (javac), tools for debugging and monitoring, libraries, and the Java Virtual Machine (JVM) for executing bytecode.
Use Case: Essential for developers writing Java code, as it provides all necessary tools for code compilation, documentation, and packaging.
Enhanced Capability: Offers tools like javadoc for generating documentation and jarsigner for signing Java Archive (JAR) files, facilitating professional Java application development.
JRE (Java Runtime Environment)
Components: This includes the JVM, core libraries, and other components needed to execute applications written in Java. It does not include development tools found in the JDK.
Use Case: Needed to run Java applications. It's essentially a package that allows a computer system to run Java programs.
Simplified Execution: Enables users to run Java applications efficiently and safely without the tools for application creation or debugging.
JVM (Java Virtual Machine)
Platform Independence: This feature enables Java’s "write once, run anywhere" (WORA) capability by allowing Java bytecode to be executed on any device equipped with a compatible JVM.
Execution Process: Loads code, verifies code, executes code, and provides the runtime environment. JVM's behavior is specified by the JRE or JDK it's part of.
Advanced Features: Includes Garbage Collection (GC) for memory management and Just-In-Time (JIT) compilation for performance optimization, enhancing the efficiency of Java applications.
❮ Previous Chapter Next Chapter ❯
Excellent article.
ReplyDeleteYou make java programming so easy and simple
ReplyDelete