Optional in Java: Everything You Need To Know

Learn everything you need to know about Java’s Optional: how it works, what problems it helps solve, and when not to use it.

Published 17 Jul 2022 · 20 min read · Tom Gregory

Jar vs. Zip Files: The Key Differences

Learn everything you need to know about the differences between jar and zip files, with practical tips and examples along the way.

Published 15 May 2022 · 7 min read · Tom Gregory

JDK vs. JRE: The Key Differences

Discover why the JDK & JRE exist, their differences & similarities, and practically how to use them.

Published 10 May 2022 · 8 min read · Tom Gregory

JAVA_HOME vs. PATH Environment Variables

Learn what JAVA_HOME and PATH do, when to use them, and how to set them up in Windows.

Published 2 May 2022 · 6 min read · Tom Gregory

10 Best Gradle Plugins for Java Projects

With so many Gradle plugins to choose from, are you sure you’re making the most of what’s available? If not, check out this list of the 10 best core Gradle plugins to work more effectively in Java projects. How were these plugins chosen? These are all core Gradle plugins, written by the Gradle team and bundled inside the Gradle distribution itself. That means they’re high quality and there’s no need to download them externally....

Published 1 May 2022 · 5 min read · Tom Gregory

Integration Test Code Coverage with SonarQube and Jacoco

It’s hepful to separate integration tests from unit tests in a Java project to run them independently. But how do you generate a combined code coverage metric? In this article you’ll discover exactly how, with a full example project which publishes Jacoco code coverage stats to SonarQube. Code coverage for unit tests A code coverage metric tells you what percentage of your proudction code is covered by tests. The higher the better....

Published 18 Apr 2022 · 5 min read · Tom Gregory

The Unknown Maven Repository System Powering Java

There’s another side to Maven: a vital repository system serving up dependencies for the millions of daily Java builds.

Published 7 Apr 2022 · 6 min read · Tom Gregory

10 Tips to Use Gradle With IntelliJ IDEA in 2022

If you’re building Gradle projects in IntelliJ IDEA, you’re probably not using the IDE to its full advantage. So to help you save time and avoid unnecessary work, here are my top 10 tips to working like a pro. 1) Create Gradle project using IntelliJ IDEA First off, use IntelliJ IDEA it to create new Gradle projects. From the Welcome to IntelliJ IDEA screen select New Project to open the New Project dialog....

Published 6 Apr 2022 · 5 min read · Tom Gregory

Maven phases vs. goals

Do you want to fully understand the difference between Maven phases and goals, and how to execute each of them? OK, let’s start at the low-level and work our way upwards. At its core Maven is a Java build tool which takes your project from some source files and resources to a shiny jar file ready to run. The way Maven achieves this, just like anything worthwhile doing in life, is by executing some code....

Published 1 Apr 2022 · 7 min read · Tom Gregory