Java guides
Every published Java guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Java guides
Most readLatest Java guides
Page 1 of 109Spring Boot: Failed to configure a DataSource and no url attribute
The application never reached the database. The URL is missing, in the wrong file, or under a profile that is not active.
Maven: release version 25 not supported and where the JDK comes from
Six places choose the JDK and only one matters per build. Diagnose the release error, then pin the compiler so it cannot drift again.
Spring Boot 4: NoClassDefFoundError javax/servlet/http/HttpServlet
Spring Boot 4 runs Jakarta only. A library compiled against javax asks for a class that no longer exists, and the stack trace hides which jar.
ClassNotFoundException vs NoClassDefFoundError in Java
One is a missing lookup, the other a failed link or initialiser. The distinction decides whether you inspect a classpath or a stack trace.
Java: java.lang.OutOfMemoryError: Metaspace
Class metadata lives outside the heap. Which limit was hit, how to find the classloader that grows, and why a container restart with exit code 137 is the same disease.
UnsupportedClassVersionError: Class File Version 61 vs 65
Bytecode newer than the JVM fails before main runs. --release, not -source/-target, keeps the class version and the API surface in agreement.
Java Record Patterns: Deconstruction, Nested Records, and switch Syntax
How Java 21 record patterns deconstruct record values, how nested patterns compose, and how guards, ordering, and exhaustiveness decide whether a pattern switch compiles.
Java 21 Virtual Threads: Syntax, Thread Pools, and Concurrency
How Java 21 virtual threads are created and scheduled, why they must never be pooled, and the pinning, ThreadLocal, and resource-limit problems that decide whether they help.
Java Text Block vs String Literal: Key Differences
java text block vs string literal: Compare Java text blocks and string literals: syntax, escaping, formatting, and when each approach fits better in real code.
Java == vs equals: Reference vs Value Comparison
java == vs equals: Learn when to use == vs equals() in Java, covering reference vs value comparison, string interning, Integer caching, and the equals-hashCode contract.