Kevin Boone

Java

Why are the variable names all wrong in my decompiled Java class? (Oct 2024)

Java decompilers usually make a good job of recovering program structure and the names of classes and methods; why do they make such a bad job of recovering variable names?

Categories: software development, Java

Log4J -- ask yourself: do I really need that library? (Oct 2024)

What can the software industry learn from the Log4J security debacle?

Categories: software development, Java, security

Exploring Java 17's container-awareness features (May 2024)

How Java's container awareness feature works with simple (Docker/Podman) containers, and OpenShift pods.

Categories: OpenShift, software development, Java

Using Apache Camel to implement an IRC bot (Mar 2024)

Camel's IRC support makes it relatively easy to implement an IRC conversation agent, that can process IRC messages and produce responses.

Categories: software development, Java, middleware

The nuts and bolts of anonymous inner classes in Java (Mar 2024)

Many of the standard Java APIs make extensive use of anonymous inner classes, to provide features that in other language would be provided using lambda functions or closures. However, anonymous inner classes have limitations that many developers find difficult to understand and to work with. This article explains why this is the case.

Categories: software development, Java

Rudiments of Java concurrency control, part 1 (Feb 2024)

The first part in a series on concurrency management in multi-threaded Java programs. This article deals with monitor objects and their use for demarcation of non-concurrent sections.

Categories: software development, Java

Getting started with Kafka Streams, part 2 (Jan 2024)

Following on from my article on the rudiments of the Kafka Streams API, this one introduces stateful operations like counting and aggregation.

Categories: software development, Java

Getting started with Kafka Streams (Jan 2024)

Kafka Streams is a Java library and framework for creating applications that consume, process, and return Apache Kafka messages. This article provides a tutorial about implementing a very basic Streams application.

Categories: software development, Java

Using Quarkus to provide a REST interface to a message broker (Oct 2022)

Using a Camel application based on Quarkus to provide a way to route messages to and from a message broker using HTTP requests

Categories: software development, Java, middleware

Comparing a natively-compiled Java webservice with C (Sep 2022)

Implementing a webservice in C and Java, to see which performs better in terms of throughput and resource usage.

Categories: software development, Java, C

Understanding Java's functional interfaces (Jul 2022)

Functional interfaces are allow Java programmers to write methods whose arguments are lambda functions. How does this work, and why would it be useful?

Categories: software development, Java

A very brief overview of Kotlin for Java developers (Nov 2021)

Kotlin is a Java-compatible programming language that has increased in popularity very quickly over the last few years. This article provides the briefest of overviews, for experienced Java developers who might be considering using Kotlin.

Categories: software development, Java

Implementing a web-based music player for Android (Oct 2021)

Using an Android device as a remotely-controllable music player.

Categories: music, Java

Using Apache Avro for passing Java objects through a message broker (Sep 2021)

This article describes how to use Apache Avro to flatten a Java object, pass it through a JMS-compatible message broker, and reconstruct it again. Avro is a compact, schema-based data representation that is becoming increasingly important in messaging applications.

Categories: software development, Java, middleware

JGemini -- a Java-based browser for Project Gemini protocols and content (Jun 2021)

Introducing a simple graphical browser for Project Gemini content; back to the 90s -- in a good way.

Categories: retrocomputing, Java

Capturing database change records using Debezium and Camel (Jun 2021)

The notion of change data capture (CDC) is becoming increasingly significant, in an IT industry that stores and manages an ever-increasing volume of data. This article describes how to begin using the Debezium CDC framework with Apache Came, to collect and process change records from disparate data sources.

Categories: software development, Java, middleware

Using Apache Avro for passing Java objects through a message broker, with a schema registry (Jun 2021)

This article extends my earlier article on using Avro with a message broker. In this article I explain how to use the Apicurio schema registry to store Avro schema artefacts that are shared by multiple clients, rather than providing local copies for each client.

Categories: software development, Java, middleware

Java as a scripting language: new auto-compilation features in Java 11 (Sep 2020)

New auto-compilation features in Java 11 give Java the potential to behave more like a traditional scripting language, such as Perl or Python. But how useful are these features in practice?

Categories: software development, Java

How to run a shell script from a Java application (Sep 2020)

Running a shell script from a Java program using Runtime.exec() appears simple. In practice, there are many pitfalls. This article describes how to avoid at least some of them.

Categories: software development, Java

Lua quick-start for Java programmers (Jul 2020)

The essentials of Lua programming in one page, for experienced Java programmers.

Categories: software development, Java, Lua

An introduction to Perl for Java programmers (Jul 2020)

A quick-start guide that highlights the similarities and differences between the Java and Perl programming languages.

Categories: software development, Java, Perl

Why use of the @Override annotation is essential in Java (Jul 2020)

Developers don't use @Override enough. Java's method visibility rules, when classes are in different packages, make polymorphic inheritance behave in odd ways. Careful use of @Override can prevent these problems, and make applications much easier to maintain.

Categories: software development, Java

A collection of Java curiosities and oddities (Jul 2020)

Why does Java have a NullPointerException when it doesn't support pointers? Why does the equality operator compare object references, but the collections framework comparison methods compare object contents? These questions and many more like them will comprehensively fail to be answered in this article.

Categories: software development, Java

Generating simple MIDI files using Java, without using the Java Sound API (Jul 2020)

Although the Java Media Framework can do some very sophisticated things, it remains relatively difficult to generate simple musical tones using Java. The de-facto method for specifying musical notes remains the MIDI file, although there are now more sophisticated approaches. It's surprisingly difficult to generate even a simple MIDI file in Java, not least because of the lack of unsigned data types. I wrote this article years (perhaps decades) ago, but it's recently become popular again, because of the use of Java in Android, and the lack of any Java API in Android for playing musical tones, other than by reading a MIDI file.

Categories: software development, music, Java

Compiling a Java program to native code using GraalVM, from the ground up (Jul 2020)

The GraalVM 'Native Image' plugin has the capability to compile to stand-alone binaries languages like Java that are normally compiled on the fly. This article describes step-by-step how to install GraalVM and the plug-in, and use it on some simple Java examples.

Categories: software development, Java

How the Fabric8 Maven plug-in deploys Java applications to OpenShift (Jul 2020)

This article describes in detail the steps the Fabric8 Maven plug-in carries out when deploying an application to OpenShift.

Categories: software development, Java, OpenShift

Making a Java JAR file self-executing (on Linux) (Jul 2020)

A quick-and-dirty way to make it possible to execute Java JAR files at the prompt, without needing to invoke the JVM.

Categories: software development, Java, Linux