Maven is using the wrong version: Explained

In this article we will go through a common issue that you can face when compiling and running applications with Maven. The syntom of this issue is that Maven is using the wrong version during the execution. We will show the cause of the issue and the remediation.

Read more

How to use Hidden Classes in Java

Hidden classes ( available since Java 15 ) allow developers to define classes that cannot be directly accessed by other classes in the same program. These classes are designed for use by frameworks that generate classes at runtime without using the standard classloading mechanism. Purpose of Java Hidden Classes Hidden classes can enable frameworks to … Read more

Modern Java Pocket Guide available

Calling all Java enthusiasts! I’m excited to share that my latest tiny ebook is now live—a concise reference guide covering all the top features in Java from version 8 to the upcoming version 22! 🚀

Read more

Java Structured Concurrency in practice

Structured concurrency (JEP 453) is a method of organizing concurrent programming in a way that maintains the relationship between tasks and subtasks. This approach aims to make concurrent code more readable, maintainable, and reliable. In structured concurrency, tasks and their subtasks have well-defined entry and exit points. This creates a clear structure similar to how structured programming works in a single thread.

Read more

JBang Cheatsheet (2024) for Java Developers

Welcome to the JBang Cheatsheet, your comprehensive guide to mastering this powerful tool for rapid Java development. JBang eliminates the need for complex setup and repetitive configuration, allowing you to focus on writing code and exploring new Java projects. Whether you’re a seasoned Java developer or just starting out, this cheatsheet will equip you with the knowledge and skills to leverage JBang‘s capabilities and accelerate your Java development journey.

Read more

Setting Maximum Memory Size in Java Applications

The heap size of Java applications significantly impacts memory utilization and, consequently, performance aspects such as garbage collection cycles and compressed pointers. Tuning the heap size becomes crucial, particularly when deploying applications within containers or across various hosts. Heap Size Calculations: The -Xmx and -Xms flags control the maximum and initial heap sizes, respectively. However, … Read more

Lombok Tutorial: Code Less, Do More

Lombok is a popular Java library that aims to reduce boilerplate code by providing annotations that generate getters, setters, constructors, and other commonly used methods automatically during the compilation process. In this tutorial we will learn how to use it and which are the pros and cons of this library.

Read more

How to create a List from Java Objects or Records

In Java, working with collections like lists is fundamental. Often, you’ll need to convert objects or records into lists for various purposes. In this tutorial, we’ll explore different approaches to create a List from a property of an Array of Java objects or Records using practical examples.

Read more

Exploring OpenJDK 17 Images: A Comprehensive guide

Java 17 is soon becoming the minimal JDK version for top frameworks such Spring Boot. Selecting the right OpenJDK 17 image for your projects is crucial. This tutorial aims to introduce and test various OpenJDK 17 images available, providing insights into their features and performance.

Read more