java.lang.ClassNotFoundException:: com.mysql.jdbc.Driver

Overview Whether you’re an experienced Java developer or a student who is just trying to learn Java, you may have encountered the ClassNotFoundException: com.mysql.jdbc.Driver not found or ClassNotFoundException: com.mysql.cj.jdbc.Driver not found error while trying to connect to a MySQL database. … Read More

What is Java Bytecode?

Java bytecode is a low-level code. That is generated by the Java compiler and executed by the Java Virtual Machine (JVM). It is a set of instructions that are similar to machine code but are not specific to any particular … Read More

MongoDB: Group aggregation in Java

In this post, we will learn the easiest way to use MongoDB $group aggregation in Java. First, we will learn to use it in MongoDB itself then try to use that aggregation pipeline in Java. Let’s analyze a MongoDB document … Read More

Difference Between JDK, JRE and JVM

The three components of Java are JDK, JRE, and JVM. In this post, we will learn each of them in detail. JDK JDK stands for Java Development Kit. It consists of all the tools that are needed to develop Java … Read More

How Java Is Platform Independent?

Before directly jumping to the reason first, we must understand how Java actually works and what are the component available in Java. So that we can easily understand how Java is a platform independent language. We all know that Java … Read More

Sort List of Objects in Java

In this short post, we will learn to sort a List of Objects in Java. First, we will create a list of employees and sort employees based on their salary. So that, a user can easily identify who is getting … Read More

Search In MongoDB Using Java

In this post, we will learn to implement a search query in MongoDB using Java. Most of the applications have search functionality. So, learning to use it will be very useful. 1. Prerequisite 2. SQL query example This query fetches … Read More

Mapping MongoDB Document to POJO Class in Java

In this post, we will learn to map directly from org.bson.Document object to Java POJO or Java Bean. By default, MongoDB Java Driver maps MongoDB collection document to org.bson.Document object. 1. Employee document sample 2. Insert employee document with BSON … Read More

MongoCollection in Spring Boot

In this post, we will learn to use a MongoCollection instance for database operations in the Spring Boot application. We all know that we have a spring boot data repository for MongoDB which has an interface MongoRepository and a class … Read More

Set Environment Variable in Tomcat

In this post, we will learn to set environment variables in the tomcat configuration file so that when the application loads then it will pick a value automatically from there. Example: Let’s say, we have a Spring Boot application packaged … Read More