foojay

Mastering the Challenges of OpenJDK Migration.

Ah, the halcyon days of Java development, where coding was king and APIs were the castle! From the nitty-gritty of the Java VM and garbage collection to the euphoria of leveraging new APIs, life was straightforward. With each Java update, you could expect nothing but improvements, a far cry from other ecosystems where every new version turned into a mini-project …

Read More »

Eliminating Bugs Using the Tong Motion Approach

Understanding the Process of Elimination in Debugging The Basics Using External Tools The Power of Unit Tests in Debugging Benefits of Mocking Frameworks The Challenges with Flaky Issues The Concept of the ‘Tong Motion’ Applying the Tong Motion to Debugging An Illustrative Case: Debugging a Server Performance Issue Wrapping Up Software debugging can often feel like a never-ending maze. Just …

Read More »

New FXComponents Library Released

A new library for Java / JavaFX has just been released. The library’s name is FXComponents and it is a Java library that contains a collection of new controls to be used in JavaFX applications. As of the time of writing, FXComponents is being built using Java 17 and JavaFX 20. Below is a brief description of the controls currently …

Read More »

Using JLink to create smaller Docker images for your Spring Boot Java application

Containers bring new flexibility and agility to software development and deployment. However, they also introduce a new attack surface that malicious actors can exploit. A compromised container can give an attacker access to other containers and even the host system. Smaller images that contain fewer artifacts are already a great help in achieving a smaller attack surface. In this article, …

Read More »

Monkey-patching in Java

The JVM is an excellent platform for monkey-patching. Monkey patching is a technique used to dynamically update the behavior of a piece of code at run-time. A monkey patch (also spelled monkey-patch, MonkeyPatch) is a way to extend or modify the runtime code of dynamic languages (e.g. Smalltalk, JavaScript, Objective-C, Ruby, Perl, Python, Groovy, etc.) without altering the original source …

Read More »

Exploring the Impact of Stack Size on JVM Thread Creation: A Myth Debunked

Among Java developers, a prevailing assumption is that the number of native threads that can be created within the Java Virtual Machine (JVM) is linked to the stack size. To scrutinize this widespread notion, an experiment was conducted. The results revealed that stack size plays a less significant role in native thread creation than previously thought. The Experiment The experiment …

Read More »

Easily Manage Different Java Versions on Your Machine with SDKMan!

So, you’re a Java developer, or maybe you’re aspiring to be one. Either way, you’ve probably faced the challenge of managing multiple versions of Java on your machine. One project requires Java 8, but another needs Java 11, yet another requires Java 17. The open-source library you’re keen on contributing to needs yet another version. What do you do? You …

Read More »

Foojay Podcast #28: Java 21 Has Arrived!

Since 2018, we get a new version of Java every 6 months. And version 21, released during today, is a long-term support version that can be used for many years. It also brings a lot of new features and improvements in both the language and the runtime. Actually, there are so many that we’ll probably not get all of them …

Read More »

Exposing your data using Spring GraphQL

In this article, we’ll take an introductory look at how we can use Spring GraphQL in our Java applications. GraphQL is a query language (hence the QL) that in conjunction with a framework such as Spring GraphQL can be used to efficiently manage our data, and even reuse existing services. It has 2 core concepts: queries: used to define which …

Read More »

Java 21 is Available Today, And It’s Quite the Update

Today’s the first day of Java 21’s availability! It’s been six months since Java 20 was released, so it’s time for another fresh wave of Java features. This post takes you on a tour of the JEPs that are associated with this release and it gives you a brief introduction to each of them, and check out the Java 21 …

Read More »