Home » Tag Archives: java 9

Tag Archives: java 9

Java Servlet onclick Example

Servlets are modules of the Java code that run in a server application to answer the client requests. They are not tied to a specific client-server protocol but are most commonly used with HTTP. The word “Servlet” is often used in the meaning of “HTTP Servlet“. In this tutorial, we will explain and show you how to call a Servlet ...

Read More »

Java Servlet Sync Context Example

Async Servlet was introduced in Servlet 3.0. It is a great way to deal with the thread starvation problem with the long-running threads. In this tutorial, we will understand what Async Servlet is.                     1. Introduction Let’s say we have a Servlet that takes a lot of time to process, something ...

Read More »

Java Nio BufferOverflowException Example

Exceptions are the unwanted or the unexpected events that occur during the execution of programs that disrupt the normal flow of the instructions. In this tutorial, we will learn about the BufferOverflowException which is very common in the Java Nio package. But before moving ahead let’s take a look and understand the basics of the Java Nio package.     ...

Read More »

Java 9 JDeps Example

In this article we cover the JDeps tool using Java 9. We will use a simple multi-module maven project and demonstrate some usage scenario’s (filtering and aggregating) of JDeps using said project. We will also make use of an online service to show how we can better visualize reports generated by JDeps. Prior to digging into the usage of JDeps on ...

Read More »

Java 9 Reactive Streams Example

Spurred on by an abundance of non-standardized Reactive Stream implementations for the JVM (Akka streams, RxJava) and an increasing need to handle stream related problems in a reactive manner, JEP 266 was augmented with the need for an interoperable publish-subscribe framework that sought to standardize reactive streams solutions for the JVM. This way library implementations now have a standard that ...

Read More »

Java 9 Annotations Example

In this article we will cover the topic of annotations by way of some theory and a brief example using Java 9. We will cover what they are, their properties, their purpose and different types. The example code will demonstrate the application of an annotation processor using custom annotations on an interface to automatically generate a stub implementation of said interface. ...

Read More »

Java 9 Jigsaw Project Tutorial

In this tutorial we will get a brief introduction to the Java 9 Jigsaw feature by a way of a simple project. This project will demonstrate some of the features of the new module system (Jigsaw) being introduced in Java 9 and how to go about structuring projects in a way that will leverage the features and adhere to the ...

Read More »

Java 9 Regular Expressions Example

1. Introduction In this example we will explore the java.util.regex package and the abstractions contained within it that facilitate the usage of regular expressions in Java 9. Even though the common String class exports an assortment of “regex” convenience methods (eg: matches(...) & contains(...)) they are implemented in terms of the java.util.regex package and thus the focus will be on said package and ...

Read More »

Java 9 Docker Example

This article will introduce us to compiling and running a Java 9 example program using Docker technology. It will prime us in the origins of Docker technology, the differences with orthodox virtualization techniques, it’s architecture, tooling and use thereof to build, and run a Java 9 program. We will also cover the fundamental Docker commands, more especially those required to accomplish ...

Read More »

Java 9 Default Garbage Collector Tutorial

1. Introduction This tutorial will introduce us to the new default garbage collector implementation for Java 9, the G1 garbage collector. The G1 garbage collector presents a brand new approach to heap layout and semantic behavior. Optimized for large heaps and tailored to address ever increasing demands of low latency and overall throughput, it provides an excellent opportunity to meet ...

Read More »