Best of BaeldungMarch 2025

  1. 1
    Article
    Avatar of baeldungBaeldung·1y

    How to Convert Nested Loops to Stream in Java

    Java Streams, introduced in Java 8, offer a declarative and efficient way to handle data by replacing complex nested loops. This post explores transforming nested loops into Streams, covering basic operations, filtering, and short-circuiting iterations. It highlights how streams can simplify complex transformations, improve readability, and enable parallel execution. However, for simple or performance-critical tasks, traditional loops may be more suitable.

  2. 2
    Article
    Avatar of baeldungBaeldung·1y

    Decreasing IntelliJ RAM Usage

    Learn how to decrease IntelliJ IDEA's RAM usage by optimizing memory settings, disabling unused plugins, adjusting garbage collection, and enabling Power Save Mode. These steps help improve performance and ensure a smoother development experience.

  3. 3
    Article
    Avatar of baeldungBaeldung·1y

    Integrating Jolokia With Spring Boot

    Learn how to integrate Jolokia with a Spring Boot application to monitor your application via API endpoints. This tutorial covers initial setup, basic commands for interacting with MBeans, and methods to secure Jolokia endpoints by restricting access through configuration.

  4. 4
    Article
    Avatar of baeldungBaeldung·1y

    Open Multiple Projects in the Same Window in IntelliJ IDEA

    Learn how to open multiple projects in the same window in IntelliJ IDEA, applicable to both Community and Ultimate Editions. The guide covers navigating the Project Structure menu, adding modules, and importing existing projects using build files like build.gradle or pom.xml. Additionally, it explains how to change the JDK version for newly imported modules if needed.

  5. 5
    Article
    Avatar of baeldungBaeldung·1y

    Introduction to OSHI

    OSHI (Operating System and Hardware Information) is a pure Java library that fetches system-level details without native dependencies. It works across Windows, macOS, and Linux, providing insights into CPU, RAM, disks, sensors, and networks. OSHI is lightweight, easy to use, and eliminates the need for system commands or JNI. Key features include monitoring CPU usage, memory statistics, disk storage, network interfaces, and sensor data. However, it has limitations such as dependency on system APIs and lack of low-level control.

  6. 6
    Article
    Avatar of baeldungBaeldung·1y

    Introduction to J2CL

    Learn how to set up a J2CL project with Maven to develop web applications using Java compiled to JavaScript. This guide covers configuring the project, customizing the web interface, and implementing a Task Manager application by interacting with a RESTful backend. Key aspects include using Maven for building and running the project, and leveraging Elemental2 and JSInterop for DOM manipulation and interoperability between Java and JavaScript.

  7. 7
    Article
    Avatar of baeldungBaeldung·1y

    Implementing Semantic Search Using Spring AI and PGVector

    Learn to implement a semantic search application using Spring AI, PGVector, and Ollama. This tutorial covers the basics of semantic search, including key concepts like word embeddings, semantic similarity, and cosine similarity. You'll set up a Spring Boot project, configure it for PGVector, and enhance it with an Ollama LLM for more context-aware responses. Example code for ingesting book data and performing searches highlights practical implementation steps.

  8. 8
    Article
    Avatar of baeldungBaeldung·1y

    The OpenAI API Java Client

    The post provides a comprehensive guide to integrating OpenAI's Java Client API for text generation and AI-driven tasks. It covers setting up the Java client, managing API tokens, and using the Completion and Assistants APIs for different AI tasks. Practical examples illustrate basic and conversational completions, as well as using the Assistant class for more complex interactions.