How to Manage Your JDKs With SDKMAN

In this blog, you will learn how to manage several Java Development Kits (JDKs) on your Linux system using SDKMAN. Besides JDKs, several other SDKs can be managed by means of SDKMAN. Enjoy!

1. Introduction

Some time ago, a colleague of mine showed me how he used SDKMAN and how easy he could maintain different versions of JDKs, Maven, etc. on his Linux system. I had heard of SDKMAN before but did not yet take the time to take a closer look at it. But now I did :-).

Going Beyond Java 8: Local Variable Type Inference (var)

According to some surveys, such as JetBrains's great survey, Java 8 is currently the most used version of Java, despite being a 2014 release.

What you are reading is one in a series of articles titled 'Going beyond Java 8,' inspired by the contents of my book, Java for Aliens. These articles will guide you step-by-step through the most important features introduced to the language, starting from version 9. The aim is to make you aware of how important it is to move forward from Java 8, explaining the enormous advantages that the latest versions of the language offer.

An Overview Between Java 8 and Java 11

One of the great news introduced in the Java world is related to the version cycle, of which we have a release every six months and a version of Long Term Support every three years. Currently, the LTS version is Java 11, from which many companies are moving towards its use. First, this movement is significant because new frameworks will not support Java 8 and will consider Java 11 as a minimum beyond the point that the next LTS will be in September 2021 with Java 11. The purpose of this article is to talk a little about the basic APIs that happens between Java 8 and Java 11.

The Functions Classes

An important point that will serve as a basis, starting with Java 8, is the new interfaces within the java.util.function package, in this overview, we'll see covert four interfaces:

How To: Docker With Spring Boot

If you are reading this, there is no doubt you have heard of Docker. Living up to the hype, Docker has become the relative standard for DevOps operations. Its ability to simplify deployments and testing by creating efficient and immutable images of the applications working in their own silo has greatly helped with its popularity. The majority of Docker’s attention can be attributed to its improved efficiency regarding placement of applications—making tech central for cloud applications. 

By unifying application development Docker makes the target environment part of your app in the form of a container rather than forcing you to prepare its environment on each machine. This means you no longer have to deal with conflicting library versions or overlapping network posts. Built images are immutable, allowing your application to work the same way locally, on a team member’s computer, or the cloud. In addition to this, it is possible to run many instances of the container on the same machine, which helps to increase the density of deployments, and in turn, brings down costs. 

How to Create an AWS Continuous Deployment Pipeline

Creating a continuous deployment pipeline will bring us a step closer to an automated build, test, deploy strategy. In order to create such a pipeline, we need to have access to several tools. Instead of installing these on on-premise servers, we can make use of the AWS cloud offer. Let’s see how this can be accomplished!

1. Introduction

We want to create an automated pipeline in order to ensure that no manual and error prone steps are required for building, testing and deploying the application. When a failure occurs during one of these steps, we will be automatically notified and can take necessary actions in order to resolve the issue.

Database Authentication + Spring Security SAML

If you are going to be developing web applications in Java, there is no doubt you are familiar with Spring Boot, a veritable toolbox for developing web applications. The most common method of authenticating users is database authentication, where credentials are stored in a database to identify authorized users that are accessible by the application. A common open standard is SAML, which can be used to handle authentication, specifically between service providers and identity providers. 

While configuring SAML auth in Spring Security is common and can be shown in many different examples, like this one from the Okta blog, it can add another layer of difficulty when continuing both database and SAML authentication methods in the same Spring Boot application. This will allow the user to be authenticated both ways, and this tutorial will show you how to find a solution! 

The Things I Love and Use from Java 11

Hey, tea lovers! Let us see what Java is providing to keep up with the latest trend or requirement. I will be going over the things I think has really improved the productivity of the developer since Java 11. We will talk about Java 11 only since it is LTS (Long Term Support) version and many people are using this only until next LTS. Make your tea to sip and code with Java 11.

Change Is Constant

As you know, Java has settled on a unique release strategy, every 6 months a new version will be released. Not only that, but the licensing is also changed. To use Oracle JDK, you need a separate license for production, however, you can use it free for development purposes. No worries, You can also use OpenJDK as an opensource option. I myself is using OpenJDK.

Getting Started With Jakarta EE and Eclipse MicroProfile

Never heard of Jakarta EE and Eclipse MicroProfile yet? Then it's time to give it the first try and see how the Java Enterprise standard evolved. By developing a small application, this post demonstrates how to use these two technologies to build cloud-ready and state-of-the-art enterprise applications.

What Is Jakarta EE?

In a nutshell, it's a set of specifications (JAX-RS, CDI, JPA, JSON-P, etc.) to write enterprise applications with Java. These specifications are documents defining the API and interaction of a technology.

Java: It’s Time to Move Your Application to Java 11

In the past few years, several exciting things have happened in the Java world, among them is certainly the new version control. Previously, it could take anywhere between two or three years for a new version to be released. Now, there's a new cadence every six months in addition to the LTS for new versions of the JVM. Currently, there is already work to deliver Java 14, however, as the latest research reveals, the use of Java 8 remains very strong for the market. This post aims to encourage and discuss the reasons for upgrading to Java 11, the current Java LTS.

There are several Java surveys that show that Java 8 is still the most popular version among developers, such as the SNYK that shows Java 8 with 64% against 25% in Java 11 and Eclipse Foundation where the number is even more significant with 80% with Java 8 against 20% with Java 11.

Guide to Java Versions and Features

Java 8, Java 11, Java 13 — what's the difference?

You can use this guide to find and install the latest Java, understand the differences between Java distributions (AdoptOpenJdk, OpenJDK, OracleJDK, etc.), as well as get an overview of Java language features, including Java versions 8-13.

You may also like: Beyond Java 8

Background Information

First, let’s have a look at some common, practical questions that people have when trying to choose the right Java version for their project.

Java 11 Nest-Based Access Control Via Reflection

Learn more about nest-based access control via Java 11 reflections.

Among the features of JDK 11, we have several hotspots (changes at the bytecode level). One of these hotspots is known as JEP 181, or nest-based access control (nests).

Basically, the nest term defines a new access control context that allows classes that are logically part of the same code entity, but which are compiled with distinct class files, to access each other's private members without the need for compilers to insert accessibility-broadening bridge methods (Java documentation).

So, in other words, nests allow nested classes to be compiled to different class files that belong to the same enclosing class. These are then allowed to access each other's private classes without the use of synthetic/bridge methods.

Using Java Optional Vs. Vavr Option

When it comes to Java, there are so many Options...

Today, I would like to discuss an essential Java topic – the usage of Optional class — and compare it with an alternative from the Vavr library. Optional was initially introduced in Java 8 and defined as “a container object which may or may not contain a non-null value.”

You may also like: 26 Reasons Why Using Optional Correctly Is Not Optional

Developers utilize Optionals in order to avoid null checking in places when code execution leads to "not a result" but also to a null value, and it can, in this regard, result in a NullPointerException. In such cases, Optional offers us some fancy functionality, but not all of it was introduced in the 8th release, some features require Java 11. Another way to handle these issues is with Vavr’s Option class.

Stay Hip With the Latest Java and Spring Boot Using JHipster 6

Stay hip with JHipster for your Java and Spring Boot apps

If you’re confused by how OAuth 2.0 and OpenID Connect (OIDC) work together, please see What the Heck is OAuth? In short, OIDC is a thin layer on top of OAuth 2.0 that adds identity.

The Java world has been very busy lately, especially with all the major Java versions releasing every six months. This honestly can be a lot to keep up with. I was using Java 8 until I was introduced to Spring Boot 2.1.

Build a Spring Boot App and Deploy Into Tomcat

Tomcat to the rescue

Deploying an application can be quite tedious because of the multiple steps that are involved. Today, I will show you how to simplify the process with Tomcat by building a web app and deploying it through the browser. 

For this tutorial, we will use: 

Love It or Hate It, Java Continues to Evolve

TechRepublic recently published an article about languages that developers love and those that they hate. This produced an interesting set of results since Java was the third most loved language as well as the second most hated. Clearly, Java, as a language, polarizes opinion. When I tweeted about this, I got one reply from Bjarne Stroustrup, the creator of C++:

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”

I think he has a point.

JavaLand 2019 Retrospective

In this article, I talk about my impressions from the JavaLand 2019 conference. This was my second time at the international conference, which, this year, took place in the theme park "Phantasialand" in Bruehl, near Cologne, Germany, from March 18th-20th.

Additionally, you can download the presentations here, as well as lecture recordings here.