Quantcast
Channel: Baeldung
Browsing all 4535 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Taking Screenshots With Selenium WebDriver

1. Overview When working with automated tests using Selenium, we often need to take a screenshot of a web page or part of a web page. This can be useful, particularly when debugging test failures or...

View Article


Image may be NSFW.
Clik here to view.

Division by Zero in Java: Exception, Infinity, or Not a Number

1. Overview Dividing by zero is an operation that has no meaning in ordinary arithmetic and is, therefore, undefined. In programming, however, while it is often associated with an error, this is not...

View Article


Image may be NSFW.
Clik here to view.

Configuring Stack Sizes in the JVM

1. Overview In this quick tutorial, we're going to see how to configure the thread stack sizes in the HotSpot JVM. 2. Default Stack Size Each JVM thread has a private native stack to store call stack...

View Article

Image may be NSFW.
Clik here to view.

How Can I Resize an Image Using Java?

1. Introduction In this tutorial, we're going to learn how to resize (scale) an image using Java. We'll explore both core Java and open-source third-party libraries that offer the image resize feature....

View Article

Image may be NSFW.
Clik here to view.

Setting Up Swagger 2 with a Spring REST API (BAEL-5516)

1. Overview Nowadays, front-end and back-end components often separate a web application. Usually, we expose APIs as a back-end component for the front-end component or third-party app integrations. In...

View Article


Image may be NSFW.
Clik here to view.

Differences Between YAML and JSON

1. Overview In this quick article, we'll take a look at the differences between YAML and JSON through quick and practical examples. 2. Format To have a better image, let's start by looking at the JSON...

View Article

Image may be NSFW.
Clik here to view.

Refer to Environment Variables in pom.xml

1. Overview In this quick tutorial, we're going to see how to read environment variables from Maven‘s pom.xml to customize the build process. 2. Environment Variables To refer to environment variables...

View Article

Image may be NSFW.
Clik here to view.

Measuring Object Sizes in the JVM

1. Overview In this tutorial, we're going to see how much space each object consumes in the Java heap. First, we'll get familiar with different metrics to calculate object sizes. Then, we're going to...

View Article


Image may be NSFW.
Clik here to view.

How to Resolve a Version Collision of Artifacts in Maven

1. Overview Multi-module Maven projects can have complex dependency graphs. These can have unusual results, the more the modules import from each other. In this tutorial, we'll see how to resolve...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 341

1. Spring and Java >> URL Matching with PathPattern in Spring MVC 5.3 [spring.io] New Spring version, new pattern matching for Request URLs with 8x throughput, and 40% less allocation rate....

View Article

Image may be NSFW.
Clik here to view.

Converting a Java String Into a Boolean

1. Overview In this tutorial, we'll explore the different ways we can use Java's Boolean class to convert a String into a boolean. 2. Boolean.parseBoolean() Boolean.parseBoolean() allows us to pass in...

View Article

Image may be NSFW.
Clik here to view.

Why are Local Variables Thread-Safe in Java

1. Introduction Before we introduced thread-safety, and how it can be achieved. In this article, we'll take a look at local variables and why they are thread-safe. 2. Stack Memory and Threads Let's...

View Article

Image may be NSFW.
Clik here to view.

Run mvn Command From Another Directory

1. Overview In this quick tutorial, we're going to see how to run the mvn command from any directory outside of the pom.xml. 2. mvn From Another Directory If we run any mvn sub-command from a directory...

View Article


Image may be NSFW.
Clik here to view.

Adding Text to an Image in Java

1. Overview Sometimes we need to add some text to an image or a set of images. Doing this manually is easy using an image editing tool. But when we want to add the same text in the same way to a...

View Article

Image may be NSFW.
Clik here to view.

YAML to List of Objects in Spring Boot

1. Overview In this short tutorial, we're going to have a closer look at how to map a YAML list into a List in Spring Boot. We'll first start with some background on how to define lists in YAML. Then,...

View Article


Image may be NSFW.
Clik here to view.

Loading JDBC Drivers

1. Introduction JDBC is a set of specifications defining the API and SPI parts of the contract for Java Database Connectivity. The standard defines the JDBC driver abstraction as the primary entry...

View Article

Image may be NSFW.
Clik here to view.

Spring Security vs Apache Shiro

1. Overview Security is a primary concern in the world of application development, especially in the area of enterprise web and mobile applications. In this quick tutorial, we'll compare two popular...

View Article


Image may be NSFW.
Clik here to view.

Convert an Array of Primitives to a List

1. Overview In this short tutorial, we'll show how to convert an array of primitives to a List of objects of the corresponding type. Typically, we might try to use autoboxing in Java. However, as we're...

View Article

Image may be NSFW.
Clik here to view.

Reading the Value of ‘private’ Fields from a Different Class in Java

1. Overview In this quick tutorial, we'll discuss how can we access the value of a private field from a different class in Java. Before starting with the tutorial, we need to understand that the...

View Article

Image may be NSFW.
Clik here to view.

Run a Java Main Method in Maven

1. Overview In this short tutorial, we're going to see how to run arbitrary main methods from any Java class using Maven. 2. The exec-maven-plugin Let's suppose we have the following class: public...

View Article
Browsing all 4535 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>