Learn how to use the Java Compiler API.
Also find me here:
Baeldung Editor
Liam Williams
Liam is a freelance software consultant based in London, UK. Liam has over 15 years of experience with JVM languages and test automation. Expert at developing high-quality software solutions that leverage appropriate automation techniques.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Java String (13)
- Testing (12)
- Java Array (11)
- Spring Boot (10)
- Core Java (9)
- Persistence (7)
- Java List (7)
- Data (7)
- Artificial Intelligence (7)
- Algorithms (7)
- Java Streams (6)
- Cloud (6)
- Java Numbers (5)
- Java IO (5)
- Java Map (4)
- Java (4)
- Spring Data (3)
- Reactive (3)
- REST (2)
- NoSQL (2)
- Networking (2)
- Java Web (2)
- Java Concurrency (2)
- Jakarta EE (2)
- JVM (2)
- Gradle (2)
- Architecture (2)
- Web Services (1)
- Spring WebFlux (1)
- Spring Security (1)
- Spring MVC (1)
- Spring Cloud (1)
- Logging (1)
- Java Dates (1)
- Java Collections (1)
- Jackson (1)
- JSON (1)
- JPA (1)
Thread per Connection vs Thread per Request
Filed under Java IO, Networking
Learn about the difference between the server threading models per connection and per request.
Get the Index Values From forEach Loop in JSTL
Filed under Jakarta EE
Learn about how to iterate using a forEach loop when using JSTL and accessing the current iteration index value.
Synchronous Communication With Apache Kafka Using ReplyingKafkaTemplate
Filed under Spring Boot
Learn how to implement the request-reply synchronous messaging pattern when working with a Kafka message broker in Java.
Java API for GitHub using GitHub-API
Filed under REST, Web Services
Learn how to access the GitHub API via an object-oriented Java representation of the official GitHub REST API.
Dynamically Ignoring Fields in Jackson
Filed under Jackson
Learn how to ignore fields dynamically when using the Jackson serialization library.
List Matchers with Generics in Mockito
Filed under Testing
Learn about how to stub methods that accept generic List parameters using Mockito.
Introduction to JanusGraph
Filed under Persistence
Learn about JanusGraph, an open-source, massively scalable graph database.
Building an AI Chatbot Using DeepSeek Models With Spring AI
Filed under Artificial Intelligence, Spring Boot
Learn how to use DeepSeek Models with Spring AI to build a Chain of Thought chatbot.
Baeldung on Linux
- All
- Administration (6)
- Processes (5)
- Files (5)
- Text Processing (4)
- Scripting (4)
- File Searching (4)
- File Editing (4)
- Web (2)
- Package Management (2)
- Network Configuration (2)
- Installation (2)
- Boot Process (2)
- Security (1)
- Networking (1)
- Filesystems (1)
- File Transfer (1)
- File Permissions (1)
- File Compression (1)
- Docker (1)
How to Start an Application on a Specific Workspace in i3
Filed under Boot Process, Processes
Learn how to use the i3 window manager to place an application on a particular workspace at application startup time.
Automating LFTP Using Bash Scripts
Filed under File Transfer
Learn how to use LFTP in Bash scripts to automate file transfers in protocols such as FTP and SFTP..
How to Measure the Actual Memory Usage of an Application or Process
Filed under Processes
Learn how to explore the memory usage of applications in your system using tools such as ps, pmap, and smaps.
Enabling kubectl Autocompletion for Zsh
Filed under Scripting
Learn how to configure kubectl autocompletion for the Zsh shell.
Increasing the Maximum Number of TCP/IP Connections in Linux
Filed under Network Configuration
Learn how to configure Linux to increase the maximum number of TCP/IP connections allowed simultaneously.
Resetting a Messed-up Terminal Screen
Filed under Administration
Learn how to fix a messed-up terminal screen with garbled characters, jumbled text, or excessive output.
Checking the Package Version Before Installing It Using apt
Filed under Package Management
Learn how to use apt to check which versions of a package are available to install.
How to Limit grep Context to “n” Characters in a Line
Filed under File Searching
Learn how to limit the grep output characters displayed before and after the match.
Set System Time Dynamically in a Docker Container
Filed under Docker
Learn how to set the system time of a Docker container dynamically in different ways.
Baeldung on Computer Science
- All
- Machine Learning (2)
- Latex (2)
- Algorithms (2)
- Security (1)
- Programming (1)
- OS (1)
- Math and Logic (1)
- Deep Learning (1)
- Artificial Intelligence (1)
Download a Hugging Face Model
Filed under Deep Learning
Learn about the different ways a model can be downloaded from the Hugging Face Model Hub.
Gale-Shapley Algorithm
Filed under Algorithms
Learn about the stable matching problem, and how to use the Gale-Shapley algorithm to solve it efficiently.
How to Find the Complexity of an Algorithm
Filed under Algorithms
Learn how to analyse the loops and recursion to determine the time and space complexity of an algorithm in terms of its Big-O notation.
Why Does the L1 Norm Enforce Sparsity in Models?
Filed under Machine Learning
Learn why the L1-norm tends to force sparsity in models, for example, when used in gradient descent regularization.
Understanding AI Prompt Injection Attacks
Filed under Artificial Intelligence
Understand the different types of prompt injection attacks, and a few prevention strategies.
What Are Markup Languages and How Do They Work?
Filed under Programming
Learn about what markup languages such as HTML, XML, Markdown and LaTeX are and how they work.
Difference Between Pipeline and make_pipeline in scikit-learn
Filed under Machine Learning
Learn about the similarities and differences between the Pipeline class and make_pipeline function in scikit-learn.
What Is the Difference Between Linear and Circular Convolution?
Filed under Math and Logic
Learn about the difference between linear vs circular convolution and how to compute it.
Bibliography per Chapter in LaTeX
Filed under Latex
Learn how to create per-chapter bibliographies in LaTeX.
Baeldung on Kotlin
- All
- Kotlin Collections (6)
- Kotlin Classes and Objects (5)
- Kotlin Concurrency (4)
- Libraries (3)
- Kotlin Basics (3)
- Kotlin (3)
- Testing (2)
- Kotlin Strings (2)
- Kotlin Functions (2)
- Kotlin Dates (2)
- Spring (1)
- Persistence (1)
- Kotlin Web (1)
- Kotlin Server-Side (1)
- Kotlin Arrays (1)
- Functional Programming (1)
- Asynchronous Programming (1)
- Algorithms (1)
Quarkus and Kotlin
Filed under Libraries
Learn how to develop a cloud-native Quarkus application with Kotlin.
Configure Kotlin’s Bytecode Version with Gradle
Filed under Kotlin
Learn how to configure the Kotlin compiler with a JVM bytecode target version in Gradle.
Extension Fields in Kotlin
Filed under Kotlin Classes and Objects
Learn about extension field support in Kotlin and alternative solutions.
Resolving Compile Error: “Const ‘val’ is only allowed on top level, in named objects, or in companion objects” in Kotlin
Filed under Kotlin Classes and Objects
Learn where and how you can use const val in Kotlin.
Resolving “Type Mismatch Inferred Type is Unit But Void Was Expected” in Kotlin
Filed under Kotlin Functions
Learn how to solve the “Unit but Void was expected” compilation error in Kotlin.
Kotlin Coroutine Continuation
Filed under Asynchronous Programming, Kotlin Concurrency
Learn how to resume a Coroutine from suspension using a Continuation operation in Kotlin.
Iterating Enum Entries in Kotlin
Filed under Kotlin Basics
Learn how to loop over the entries of an Enum in Kotlin.
Difference Between clearAllMocks() and unmockkAll() in MockK
Filed under Testing
Learn about the difference between clearAllMocks() and unmockkAll() in MockK and when to use each one.
Serialize Enum Property to JSON in Kotlin
Filed under Libraries
Learn how to serialize a Kotlin enum property to JSON using Kotlin libraries.
Baeldung on Ops
- All
- Docker (5)
- DevOps (4)
- Git (3)
- Deployment Tools (2)
- Logging (1)
- Kubernetes (1)
- Jenkins (1)
- Cloud (1)
Container Hostnames and DNS with Docker Compose
Filed under Docker
Learn about how hostnames DNS entries can be used to communicate between containers with Docker Compose.
Guide to Using GitLab CI to Run Tests Locally
Filed under DevOps
Learn how to speed up development by using GitLab CI to run tests locally and not on a remote build agent.
Guide to Using cURL in gitlab-ci.yml
Filed under Git
Learn how to use cURL commands to make HTTP requests in a GitLab CI pipeline.
Creating a Volume in a Specific Directory With Docker
Filed under Docker
Learn how to create a volume in a specific host directory when using Docker.
How To Pull a Docker Image From an Insecure Registry
Filed under Docker
Learn how to configure Docker to pull images from insecure registries.
Guide to Passing GitLab Artifacts to Another Stage
Filed under DevOps
Learn how to pass artifacts from one GitLab stage to another.
How To Save a Docker Container State
Filed under Docker
Learn how to save and restore the state of a running Docker container.
Get Current Branch in GitHub Actions
Filed under DevOps
Learn how to access the current branch in GitHub Actions pipelines.
Running Multiple CI/CD Pipelines in the Same GitLab Repository
Filed under Deployment Tools, Git
Learn how to use a single GitLab repository to specify multiple CI/CD pipelines.
Baeldung on SQL
- All
- SQL Queries (3)
- SQL Functions (2)
- DML (2)
- Databases (1)
- Database Concepts (1)
- DDL (1)
What Is a Conceptual Data Model and Why Is It Important in SQL Design?
Filed under Database Concepts
Learn about conceptual data modeling, the first step in database design.
Extracting the First N Characters of a Value in SQL
Filed under SQL Functions
Learn how to extract a prefix of length N when querying string data in SQL.
Accessing Outer Query Tables Within a Subquery
Filed under SQL Queries
Learn how to use an outer reference in SQL to access an outer query table within a subquery.
How to Remove the First N Characters of a Column in SQL
Filed under SQL Functions
Learn how to use SQL functions such as SUBSTRING and RIGHT to remove the first few characters of a column in SQL.
How to Export SQL Schema Without Data
Learn how to export a SQL schema without any data from an existing MySQL or PostgreSQL database.
Which SQL Statements Require a Commit in MySQL
Filed under DML
Learn which DDL and DML statements require an explicit COMMIT in MySQL.
How to Efficiently Insert Multiple Rows in a Single SQL Query
Filed under DML
Learn how to insert multiple rows of data into a table using a single SQL query.
How to Count the Number of Distinct Values in a SQL Column
Filed under SQL Queries
Learn how to count the number of unique values in a column using SQL.
How to Order Results by Multiple Columns in SQL
Filed under SQL Queries
Learn how to sort the results of an SQL query by multiple columns in the ORDER BY clause.