Best of JVM2025

  1. 1
    Article
    Avatar of baeldungBaeldung·33w

    How to Reduce Spring Boot Memory Usage?

    Spring Boot applications typically consume significant memory (150+ MB) due to JVM architecture, embedded server threads, and framework overhead. Memory usage can be reduced through JVM tuning (serial garbage collector, reduced thread stack size, RAM limits), configuring web server thread pools, container-aware deployment practices, and removing unused dependencies. Key techniques include using -XX:+UseSerialGC, -Xss512k for thread stacks, setting MaxRAM limits, reducing Tomcat threads to 20, and matching JVM flags to container limits.

  2. 2
    Article
    Avatar of javarevisitedJavarevisited·43w

    Top 140 Java Interview Questions Answers for 3 to 5 Years Experienced Programmers

    A comprehensive collection of 140 Java interview questions and answers specifically designed for developers with 3-5 years of experience. Covers advanced topics including multithreading and concurrency, JVM internals and garbage collection, Java collections framework, IO/NIO, design patterns, and coding challenges. The questions range from basic concepts to sophisticated topics like volatile variables, memory management, thread safety, and performance optimization. Includes practical coding examples and best practices for writing clean, efficient Java code.

  3. 3
    Article
    Avatar of last9Last9·49w

    JVM Metrics: A Complete Guide for Performance Monitoring

    JVM metrics are crucial for Java application performance monitoring, helping detect bottlenecks, diagnose crashes, and guide capacity planning. Key metrics include heap memory usage, garbage collection, thread metrics, and runtime performance indicators. Effective monitoring and using tools like JMX, VisualVM, or APM solutions ensure optimal JVM performance, contributing to better application responsiveness and stability.

  4. 4
    Video
    Avatar of codeheadCodeHead·23w

    99% Of Devs Are SLEEPING On Kotlin

    Kotlin has evolved beyond its Android origins into a versatile multiplatform language suitable for backend, frontend, and mobile development. Key advantages include built-in null safety, seamless Java interoperability, modern coroutines for asynchronous programming, and the ability to share code across platforms. Companies like Netflix and Pinterest are adopting Kotlin for server-side services due to its safety and productivity benefits. The language offers incremental adoption paths through frameworks like Ktor for backends and Kotlin Multiplatform for cross-platform development, making it a practical choice for teams looking to reduce bugs and improve development velocity.

  5. 5
    Article
    Avatar of foojayioFoojay.io·1y

    How JVM handles exceptions

    The JVM handles exceptions through a structured mechanism involving bytecode instructions and an exception table. When an exception is thrown, the JVM looks up the appropriate handler in the method's exception table. Handlers can be catch or finally blocks, and each handler specifies a range of instructions it covers and a target address where execution should continue. If no handler is found, the JVM looks up the call stack until it finds an appropriate handler, executing any finally blocks it encounters along the way.

  6. 6
    Article
    Avatar of foojayioFoojay.io·20w

    Java 25: What’s New?

    Java 25 is the new Long-Term Support release featuring 18 JEPs. Key additions include PEM format support for cryptographic objects, Stable Values API for lazy initialization, JFR enhancements with CPU-time profiling and method timing/tracing, and improved AOT capabilities with method profiling. Several preview features graduate to standard including Scoped Values, Module Import Declarations, and Compact Source Files. The release removes 32-bit x86 support and includes performance optimizations like improved String hashcode handling and new security algorithms.

  7. 7
    Article
    Avatar of infoworldInfoWorld·1y

    The best Java and JVM language frameworks

    The Java ecosystem supports several outstanding back-end frameworks, including those for modern JVM languages like Scala and Kotlin. This piece compares seven highly-regarded frameworks: Spring, Micronaut, Quarkus, JHipster, Ktor/Kotlin, Play/Scala, and Vert.x. Each framework is evaluated based on features like API support, realtime capabilities, static site generation, and unique strengths. The Java ecosystem is described as stable, secure, and capable of supporting diverse development needs.

  8. 8
    Article
    Avatar of netguruNetguru·1y

    Java Performance: Optimizing Code for Maximum Efficiency

    Optimizing Java performance can lead to faster applications, reduced resource usage, and better user experiences. Focusing on key areas such as memory management, garbage collection, and code optimization is essential. Recent versions of Java, particularly Java 8 and later, offer built-in features and tools to enhance performance. Effective performance optimization involves measuring the efficiency of Java applications using profiling tools, proper memory management, and tuning JVM settings for optimal performance.

  9. 9
    Article
    Avatar of justjavaJust Java·27w

    Java Developer Reflection

    A developer reflects on Java development practices and poses questions about what makes a strong Java developer in the age of AI. The discussion touches on core concepts like OOP, concurrency, collections, streams, JVM internals, and design patterns as foundational skills. The author seeks community input on motivation for continuous learning and best practices in modern Java development.

  10. 10
    Article
    Avatar of javarevisitedJavarevisited·48w

    Understanding JVM Memory architecture and guidelines and tools for troubleshooting

    Understanding the JVM memory architecture is crucial for diagnosing memory issues in Java applications, such as OutOfMemoryError or performance degradation. This involves different memory components like Heap, Metaspace, and Code Cache, each serving specific roles. Generational Garbage Collection (GC) helps efficiently manage memory by classifying objects into short-lived and long-lived categories. Common problems include memory leaks, high object creation rates, and improperly sized memory sections. Tools such as JVisualVM, JConsole, and Java Mission Control are recommended for monitoring and troubleshooting memory issues.

  11. 11
    Video
    Avatar of bytemonkByteMonk·31w

    The JVM Secret That Makes Code Faster!

    The JVM uses just-in-time (JIT) compilation to continuously optimize code while it runs, unlike traditional ahead-of-time compilation. It starts by interpreting bytecode, then compiles frequently used methods into optimized machine code. This adaptive approach allows JVM applications to improve performance over time by learning from real execution patterns, making it ideal for long-running services despite slower startup times.

  12. 12
    Article
    Avatar of inside_javaInside Java·1y

    A Deep Dive into JVM Start Up – Inside.java

    Explore the initialization process of the Java Virtual Machine (JVM), including its startup phases and optimizations to improve performance.

  13. 13
    Video
    Avatar of awesome-codingAwesome·26w

    Modern Java is pretty cool and you can't avoid it anymore...

    Modern Java has evolved significantly from its verbose, bloated reputation. Key improvements include records for reducing boilerplate, type inference with the var keyword, Project Loom's virtual threads for simplified concurrency, and advanced garbage collectors for better performance. New frameworks like Quarkus leverage GraalVM and ahead-of-time compilation to deliver cloud-native applications with millisecond startup times and reduced memory footprints, while maintaining familiar Java syntax and patterns. These changes make Java competitive with modern languages while preserving its enterprise stability and extensive job market.

  14. 14
    Article
    Avatar of jakartaeeJakarta EE·19w

    Book Review: Kotlin for Java Developers

    A book review of "Kotlin for Java Developers" that uses a problem-reasoning-solution approach to teach Kotlin. The book is divided into four sections covering basics, core concepts, idiomatic Kotlin features, and practical topics like coroutines and testing. While the first two chapters are weak and superficial, chapters three onward deliver strong value through structured concept presentations with Java comparisons and practical examples. Best suited as a complementary learning resource that can be completed in about a week, providing solid foundation for Android or backend Kotlin development.

  15. 15
    Article
    Avatar of baeldungBaeldung·20w

    Reduce Object Header Size and Save Memory in Java 25

    Java 25 introduces JEP 519, which makes Compact Object Headers a production feature in HotSpot JVM. This reduces object header size from 96-128 bits to 64 bits on 64-bit platforms by merging the mark word and class pointer. The change delivers 10-20% memory reduction for applications with many small objects, improves cache utilization, and reduces garbage collection pressure. Benchmarks show 22% heap space reduction and 15% fewer GC cycles in SPECjbb2015 tests. The feature requires compressed class pointers and is not yet supported by JVMCI on x64.

  16. 16
    Article
    Avatar of communityCommunity Picks·43w

    History of Java: evolution, legal battles with Microsoft, Mars exploration, Spring, Gradle and Maven, IDEA and Eclipse

    Java's evolution from 1990 to present spans from its origins as Oak at Sun Microsystems to modern features like virtual threads in Java 21. Key milestones include the legal battle with Microsoft over JVM compatibility, revolutionary changes in Java 8 with lambda expressions and streams, Oracle's acquisition of Sun Microsystems, and the development of essential tools like Spring framework, Maven, Gradle, IntelliJ IDEA, and Eclipse. The language has been used in space missions including Mars rovers, and continues evolving with upcoming projects like Valhalla for value objects and Loom for enhanced concurrency.

  17. 17
    Article
    Avatar of inside_javaInside Java·1y

    A Deep Dive into JVM Start-up – Inside.java

    The JVM start-up process involves multiple complex steps beyond simply executing compiled Java bytecode. Key stages include validating user input, detecting system resources, preparing the environment, selecting a garbage collector, and handling class loading, linking, and initialization. Understanding these steps can aid in debugging and performance optimization. Upcoming improvements like Project Leyden aim to further enhance start-up performance.

  18. 18
    Article
    Avatar of baeldungBaeldung·30w

    Stable Values in Java 25

    Java 25 introduces the Stable Value API (JEP 502) to solve the trade-off between immutability and delayed initialization. StableValue acts as a thread-safe wrapper that guarantees single initialization while enabling deferred computation of expensive objects. The API includes StableSupplier for lazy initialization, StableList and StableMap for collections with on-demand element computation, and StableFunction for memoized function calls. This approach maintains immutability benefits and JVM optimization opportunities while avoiding upfront initialization costs that can slow application startup.

  19. 19
    Article
    Avatar of inside_javaInside Java·33w

    Java 21 ⮕ 25: Performance and Runtime Enhancements #RoadTo25 – Inside.java

    Billy Korando breaks down the key performance and runtime enhancements between Java 21 and Java 25, covering important updates like Compact Object Headers, ZGC improvements, and JFR enhancements. This comprehensive overview helps organizations understand the significant changes across multiple Java releases without having to review extensive release notes.

  20. 20
    Article
    Avatar of java_libhuntAwesome Java Newsletter·1y

    Understanding JVM Garbage Collector Performance :: The Mill JVM Build Tool

    Garbage collectors are vital for managing memory in programming languages, particularly in environments like the JVM. This post explores the fundamental workings of garbage collectors, providing both theoretical insights and real-world benchmarks, especially focusing on JVM implementations. Key points include the design and performance of simple versus modern GCs, comparing them with other strategies like reference counting, and understanding their impact on application performance. Benchmarks for JVM's G1 and ZGC are provided to illustrate practical differences, highlighting how memory allocation and live-set size impact GC pause times and throughput.

  21. 21
    Article
    Avatar of javarevisitedJavarevisited·1y

    What happens inside JVM Memory? Scope & example walkthrough.

    Understanding JVM runtime memory areas is crucial for optimizing performance, avoiding memory leaks, and improving debugging and concurrency handling. This post explains the roles, creation and destruction times, and scope of different memory areas within the JVM, using a step-by-step walkthrough of a simple Java program to illustrate how memory is allocated, stack frames are created and destroyed, and execution flow is tracked.

  22. 22
    Video
    Avatar of fknightForrestKnight·32w

    Java is 30 Years Old // Here’s Why It’s Still Winning

    Java celebrates its 30th anniversary as a dominant programming language despite common criticisms about verbosity and complexity. The language survived where competitors like Flash, Silverlight, and ColdFusion failed by focusing on enterprise reliability and platform independence through the JVM. Modern Java has evolved with features like lambda expressions, type inference, and frameworks like Spring Boot, while maintaining backward compatibility. Major companies like Netflix and banks rely on Java for handling billions of requests, proving its continued relevance in enterprise applications.

  23. 23
    Article
    Avatar of inside_javaInside Java·1y

    JVM Tuning with Machine Learning on Garbage Collection Logs – Inside.java

    Optimizing Java Virtual Machine (JVM) performance can significantly enhance Java applications. This research explores automating JVM tuning using machine learning (ML) models trained on garbage collection (GC) logs. The study demonstrated that ML could contribute to a 20% improvement in application throughput by adjusting JVM memory-related flags, specifically focusing on young generation size. The promising results suggest ML can simplify and improve JVM tuning even for those without in-depth JVM knowledge.

  24. 24
    Article
    Avatar of baeldungBaeldung·27w

    Java Serialization with Non Serializable Parts

    Explores techniques for serializing Java objects that contain non-serializable fields. Covers using transient fields to skip serialization, the readResolve() method for post-deserialization initialization, and custom writeObject()/readObject() methods for full control. Also demonstrates wrapper classes as a solution when you can't modify the original class source code.

  25. 25
    Article
    Avatar of inside_javaInside Java·1y

    Modern Java Deep Dive – Inside.java

    Java 22 and 23 introduce numerous features, including unnamed patterns, module imports, the foreign-function and memory API, stream gatherers, the class-file API, enhanced main function handling, multi-source-file program launching, Markdown support in JavaDoc, and improved garbage collection. This post covers these new, improved, and finalized aspects in detail.