-
Creating a JavaFX World Clock from Scratch (Part 6)
Hello, and welcome to the last part of this series of articles on creating a JavaFX World Clock from scratch!
In this part, I will show you how to make WebService calls (RESTful) to retrieve weather data based on geographic locations.
If you remember, in Part 5 you learned how to use the JavaFX WebView and the popular mapping library Leaflet JS enabling the user to discover geographic locations. In Part 6, I will show you how I used Java 11’s Http Client to retrieve and display weather content. If you are new to this series, you can visit Part 1-5.
-
Debugging Java on the Command Line
Some bugs are hard to replicate on your personal computer but easily replicated on production or test machines. It is a common situation that professional Java developers deal with frequently. To debug such problems, OpenJDK provides two tools, remote debugging and jdb.
This article focuses on jdb.
For Java applications, typical production and test machines are Linux servers without display managers, so that only command line tools are available. Here we cannot use professional IDEs like IntelliJ IDEA, Eclipse, or Apache NetBeans IDE.
In such scenarios, we can use jdb. jdb is a command line debugger and it is part of the OpenJDK.
-
Jakarta EE Application Deployment to Kubernetes Cluster in Jelastic PaaS
Recently, Jelastic were asked to sponsor cloud hosting of a Jakarta EE project, called Cargo Tracker.
Being a member of Jakarta EE Working Group, Jelastic wanted to support the community and thus we started to run this application at one of our service providers (Scaleforce).
In this article, we would like to show how to deploy the Jakarta EE projects to the Kubernetes cluster within Jelastic PaaS using Cargo Tracker as an example.
-
Hidden Dracula Polymorphism Java Challenge
Polymorphism, the ability of an object to take on multiple forms, is one of the most important Java concepts.
We might not even be aware we’re using it all the time but when we instantiate an ArrayList and assign it to a variable of the List type, we are using polymorphism.
It’s a powerful concept because it helps us to decouple responsibilities, therefore, making code more flexible and easier to maintain.
-
Asynchronous CompletableFuture San Francisco Adventure Java Challenge
The Completable Future feature is powerful for better performance when running asynchronous methods.
In Java 5, there is the Future interface, however, the Future interface doesn’t have many methods that would help us to create robust code.
To solve the limitations of the Future interface, we have the CompletableFuture API with methods that will help us to build reliable high-performant software.
Now that we had the intro about CompletableFuture, let’s go to the Java Challenge!
-
Creating a Simple Spring Boot Application in IntelliJ IDEA
In this tutorial, we’ll use the New Project Wizard in IntelliJ IDEA to create a Spring Boot project with the Spring Web dependency.
We’ll also create a Spring Controller and served some text to the local Tomcat webserver.
Finally, we’ll add a test for our HTTP call.
-
Automatic WildFly Clustering in Managed Domain Mode and Scaling inside Containers
How to extend WildFly from standalone server to cluster in managed domain mode inside containers for running cloud-native scalable applications?
There is no need to rebuild the whole application architecture in order to gain the required outcome from both managed domain mode and container technology.
Migration of legacy projects from VMs to micro clusters with system containers is not that painful at all.
It brings a “rich taste” of flexibility and efficiency for increasing competitive advantage.
-
Type Erasure Generics Java Challenge
It’s possible to use type erasure generics in a method with Java. To know how to use generics is important because then you are able to create highly reusable code.
In the following Java Challenge, you will see the generic type that will be erased by the compiler and then will be replaced by the type we defined at runtime.
Note also that we are using the extends keyword which means that the generic type will extend the other type.
Without further ado, it’s time to solve the Java Challenge quiz!
-
Map, Equals, Hashcode Java Challenge
Understanding deeply how to use a Map, equals, and hashcode in Java will be a massive help for you to create high-quality code.
The Map and object reference concepts are not only present in the Java language but in almost all programming languages.
Therefore, if you master the concept of object references, equals and hashcode, and Maps, you can apply this in other programming languages and master them far more easily.
-
Optional takeWhile dropWhile Java Challenge
The Optional concept is present in many programming languages. The main goal of the Optional class is to avoid NullPointerException. It’s much easier to deal with null values when we use the concepts of an Optional.
In this challenge, we will also explore the takeWhile and dropWhile methods from Java 9. Therefore you will be upgrading your knowledge with Optional, takeWhile, and dropWhile!
Are you prepared to have fun with this Java Challenge and refine your Java skills?