Home » Java


Java14: Join Database Tables with Java 14’s new Record

Did you know that you can join database tables into a Java Stream with Java 14’s preview record feature? Read this short article and find out how it is done using the  Speedment Stream ORM. We will start with how to set up your project. Setup Download Java 14. Go to the Speedment Initializer and download your project skelaton (including ...

Read More »

JDK 14/JEP 305 instanceof Pattern Matching “Smart Casts”

I generally view the presence of the instanceof operator in Java code as a “red flag,” meaning that it’s not necessarily wrong to use instanceof in certain situations, but its use sometimes indicates a design issue that could be resolved in a cleaner way as described in some resources referenced at the end of this post (including resources about similar ...

Read More »

Java – Missing font – Crashing App!

Eclipse MAT,  Heaphero are all popular java tools to analyze large size heap dumps. Recently we ran in to an interesting problem when trying to analyze a heap dump file in Eclipse MAT. Tool was crashing because of missing font 😊. We thought we will share with you what we found out. ArrayIndexOutOfBoundsException  in CompositeStrike.getStrikeForSlot() Here is our environment: Eclipse ...

Read More »

Set Visual Studio Code as default editor in jshell

Java Shell (jshell) is an interactive tool for learning and prototyping in Java. It was introduced with Java 9 and since then I use it ocassionally either for some quick prototyping, during presentations or simply to verify new features in the Java language. Since jshell is a command line tool (with basic intellisense) editing files in jshell is not the ...

Read More »

How to use regular expression in Java?

Regular expressions are very important tool for seraching in text. Below is the code snippet for executing regex search and capturing different parts of the string based on the regular expression 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ...

Read More »

Using Websocket with Spring Framework and Vuejs


Websockets are full duplex (persistent) connections between client and server such that both can share information with each other without the need for repeatedly establishing a new connection. This removes the need for repeated polling from the client to get updates from the server. Not all browsers support Websockets and hence we make use of SockJS javascript library to create ...

Read More »