Image for post
Image for post

When your application goes beyond a dozen of lines of code, you should probably split the code into multiple classes. At this point, the question is how to distribute them. In Java, the classical format is the Java ARchive, better known as the JAR. But real-world applications probably depend on other JARs.

This post aims to describe ways to create self-contained executable JARs, also known as uber-JARs or fat JARs.

What is an executable JAR?

A JAR is just a collection of class files. To be executable, its META-INF/MANIFEST.MF file should point to the class that implements the main() method. You do this with the Main-Class attribute. …


Image for post
Image for post

In the first post of this series, we went through the rise and fall of some of the desktop frameworks, mainly Java ones. This post and the following will each focus on a single JVM framework. To compare between them, a baseline is in order. Thus, we will develop the same application using different frameworks. We will use the Kotlin language because some of the frameworks require Kotlin.

This is the 2nd post in the The state of JVM desktop frameworks focus series.Other posts include:

  1. The state of JVM desktop frameworks: introduction
  2. The state of JVM desktop frameworks: Swing (this…

Image for post
Image for post

I’m interested in GUI applications since I’ve starting coding. Building a back-end app that manages teraflops of operations is an impressive engineering feat. But the feedback cycle when developing a desktop app is much shorter. That makes it, at least for me, much more motivating. This is even truer for side-projects. In this focus, I’d like to assert the state of JVM desktop frameworks.

This first post is an introduction, framing the general background, and browsing through the frameworks I’ve encountered.

Background

Let’s face reality: in the fight of web apps vs. desktop apps, the former ones have won. It’s just less expensive to deploy them. That’s the reason people started to push for them, though the HTML-JavaScript-CSS combo offered a poorer alternative at the time. …


Image for post
Image for post

One of my current talks is about creating a Kubernetes operator in Java. I demo it step by step. In the later steps, I’m using GraalVM native image to create a native executable. In that regard, some libraries are not compatible with the native image creation process. Several options are available to make them work anyway.

One of the options is to substitute incompatible code with compatible one. In the above post, I describe how to use those substitutions. I thought I had it right. I was wrong. The code didn’t work in my latest demos. …


Image for post
Image for post

Hazelcast is built on open source foundations. It’s part of our DNA, and we strive to uphold open source values in our day-to-day work. This commitment allows external contributors to make Hazelcast better so that the whole community can benefit from a collective effort.

No contribution is too small, but, indeed, some of our community members constantly go “above and beyond” to help us improve our software. For a long time, we wanted to find a way to show them how much we value their time and effort. …


Image for post
Image for post

Last September, I wrote how to migrate from an Imperative Programming codebase to a Reactive Programming one in a step-by-step process. Because of its popularity, I illustrated the post with a Spring Boot demo. The final result uses Mono and Flux from Project Reactor. I also made sure that no step in the processing pipeline is blocking thanks to Blockhound.

I wrote the code in Java so that it could be accessible to the largest audience. But I’m still a Kotlin fan at heart. Hence, I ported the codebase to Kotlin.

But Kotlin brings more benefits to the table. In the context of reactive programming, it offers coroutines. I wanted to showcase them, but I found it harder than expected migrating from Project Reactor to coroutines. …


Image for post
Image for post

My job requires me to speak at conferences. Despite the current situation, this hasn’t changed much. At the time of this writing, I submitted 439 different proposals to 215 unique conferences in 2020.

I already wrote some advice for junior conference speakers. As a follow-up, I’d like to offer my view on the organization of conferences, from my speaker’s point-of-view. While the online and the on-site experiences are quite different, most of my feedback applies to both.

DO send approval letters

Let’s start easy. Just send approval emails when you’ve made the decision. …


Image for post
Image for post

Containerizing an application based on a “scripting” language is straightforward. Add the sources, download the dependencies, and you’re good to go. One could say they are WYSIWYR.

FROM python:3

ADD requirements.txt . # 1
RUN pip install # 2

ADD script.py . # 3

CMD ["python", "./script.py"] # 4
  1. Copy the description of the dependencies
  2. Download the dependencies
  3. Copy the main script
  4. Run the script

With compiled languages in general and Java in particular, things are a bit different. In this post, I’d like to list some alternatives to achieve that.

A sample app

To describe those alternatives, we need a sample application. We will use a Spring Boot one, that offers a REST endpoint and store data in Hazelcast. It’s built using Maven, with an existing wrapper. …


Image for post
Image for post

When I started my career, books with titles such as “Teach Yourself C in 21 Days”, and “Learn Java in 7 Days” were pretty popular. I was impressed that people could read such books. I never thought I could learn a new language in such a small amount of time myself. Time has passed. I’ve come to realize that I’m not alone in that case. Those books just happen to stretch the definition of learning a new programming language — and I’m being polite. In this post, I’d like to detail a bit of my definition of learning.


When I started my career, XML was ubiquitous. The meta-information in a Java JAR file — the manifest — follows a proprietary format. But Java EE designers built it from the ground up on XML: meta-information of all artifacts is in XML format e.g. web.xml, ejb-jar.xml, application.xml, etc.

Java EE is one example I experienced personally. But XML was everywhere in the enterprise world at the time. Its prevalence manifested itself in two areas: configuration and data transfer.

Ever since then, it would be an euphemism to say XML has been losing in popularity. Other formats, such as JSON and YAML, have replaced it in the hearts of developers. …

About

Nicolas Fränkel

Dev Advocate @Hazelcast . Former developer and architect. Still teaching, learning and blogging.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store