Quantcast
Channel: Java Archives - Java Code Geeks
Browsing all 745 articles
Browse latest View live
↧

Fix ClassCastException Ljava.lang.Object to Ljava.lang.Integer

In Java, the ClassCastException occurs when we attempt to cast an object to a subclass of which it is not an instance. Let us delve into understanding how to fix ClassCastException in Java,...

View Article


Java Execute JAR File Example

A JAR (Java Archive) file is a packaged collection of Java classes and resources that can be executed as a standalone application if it contains a MANIFEST.MF file specifying the main class. Let us...

View Article


Java Custom Linked List Implementation

Arrays store elements in a contiguous memory block, whereas a linked list spreads its nodes across different memory locations. Each node holds both data and a reference to the next, allowing efficient...

View Article

Java Maven OWASP Dependency-Check Example

With the increasing use of open-source libraries, ensuring software security has become a critical aspect of development. Many applications rely on third-party components, making them vulnerable to...

View Article

Avro Schema From Java Class Example

Apache Avro is a data serialization system that is compact, fast, and ideal for distributed applications. Let us delve into understanding how a Java class can generate an Avro schema. 1. What is Avro?...

View Article


Expert Tips for Selecting the Best Mobile App Development Service for Your Needs

source: medium.com Choosing a contractor is a real headache. You need to weigh everything carefully, avoid mistakes, and make the right call, or the whole project could fall apart. The success of the...

View Article

JDK_JAVA_OPTIONS vs JAVA_TOOL_OPTIONS

1. Introduction JDK_JAVA_OPTIONS and JAVA_TOOL_OPTIONS are environment variables used to pass Java Virtual Machine (JVM) options to configure the JVM without modifying the scripts. In this article, I...

View Article

Java REST Swagger vs. HATEOAS

In modern RESTful API development, API documentation and hypermedia-driven APIs play a crucial role. Two key concepts that developers often use are Swagger and HATEOAS. While Swagger helps document...

View Article


Java String Slicing Example

Python provides a powerful and concise way to slice Strings using simple syntax. However, Java does not have built-in String slicing like Python. Let us delve into how to implement String slicing in...

View Article


Mock JWT Decoding with JwtDecoder in JUnit Tests

JSON web tokens (JWTs) are widely used for microservices and Spring security authentication. When testing Spring applications, mocking JWT decoding is often necessary. Let us delve into understanding...

View Article

Getting Started with ActiveJ

ActiveJ is a lightweight, high-performance Java framework designed for building scalable and efficient applications. It provides an alternative to traditional Java frameworks like Spring and Micronaut...

View Article

JIT vs. AOT: Choosing GraalVM Native Image for Java

Java applications traditionally rely on Just-In-Time (JIT) compilation for performance optimizations. However, with the advent of GraalVM’s Native Image, developers can leverage Ahead-Of-Time (AOT)...

View Article

Zero-Downtime Deployments in Spring Boot with Kubernetes and Istio

Ensuring zero downtime during deployments is crucial for modern applications, especially in microservices architectures. Kubernetes, combined with Istio, provides powerful strategies such as canary...

View Article


Using LangChain4j in Micronaut

LangChain4j is a Java library that simplifies working with LLMs, enabling us to create AI-driven applications with minimal complexity. By leveraging LangChain4j, we can build applications that interact...

View Article

Spring Boot Pkl Example

Pkl is a configuration-as-code language developed by Apple, blending the simplicity of static formats like JSON with the expressiveness of programming languages. It aims to enhance configuration...

View Article


Event Sourcing with Axon Framework in Spring Boot

Event Sourcing is a powerful architectural pattern that captures all changes to an application state as a sequence of events. These events are stored in an event log, which can be replayed to...

View Article

OpenCV Java Object Detection

In this article, OpenCV Java Object Detection demonstrates how to identify specific objects in a real image using OpenCV DNN(Deep Neural Network) module, powered by the OpenCV inference engine....

View Article


Serverless Spring Boot with Knative on Kubernetes

Modern applications demand scalability, efficiency, and flexibility, especially when handling unpredictable workloads. Traditionally, Kubernetes offers robust orchestration for containerized...

View Article

Exploring Quarkus WebSockets

This article explores Quarkus WebSockets Next, a powerful way to enable real-time communication in Quarkus applications. Let us delve into understanding Java Quarkus WebSockets next. 1. Introduction...

View Article

Spring Batch Composite Item Reader Example

Batch processing plays a crucial role in applications that handle large datasets, ensuring efficient data ingestion, transformation, and storage. In Spring Batch, the ItemReader component is...

View Article
Browsing all 745 articles
Browse latest View live