-
Compact Strings: Reclaim 25% of Java Heap Memory & Lower Your Cloud Bills
Did you know that you can save up to 25% of your heap memory and your Cloud bills without any effort? Well, it’s true.
Many exciting features have been added to the latest releases of Java recently and I’m going to cover one that is often overlooked in this article.
-
🚀 Demystifying JVM Memory Management
In this multi-part series, I aim to demystify the concepts behind memory management and take a deeper look at memory management in some of the modern programming languages, in particular Java, Kotlin, Scala, Groovy, and Clojure.
I hope the series would give you some insights into what is happening under the hood of these languages in terms of memory management.
In this chapter, we will look at the memory management of the Java Virtual Machine (JVM) used by languages like Java, Kotlin, Scala, Clojure, Groovy, and so on.
-
Much Ado About Nothing in Java
Occasionally something in Java pops up that I thought I knew about, but it turns out I didn’t appreciate all the subtle details.
This was recently the case for “nul”. Before I started using Java, the main programming language I used was C. This was great for things like operating systems and device drivers because it uses explicit pointers. References to data are through a numerical address that can be manipulated if required.
Although null might seem like a simple, straightforward concept, there are some edge cases that make its use require a little more thought. I hope this provides you with a better understanding of nothing (null).
-
Migrating Browser-Based Java Applets to IcedTea-Web using JNLP
Let’s use a 20 year old JAR, once created for a Java Applet to be run in the Java 1.1 Browser Plugin… and run it on JDK 11!
It now runs outside of any Web Browser and without modifying its decades-old JAR. The Applet was once created and offered to browse through all raw color images uploaded by the Mars Pathfinder Lander which settled down on the planet on July 4th, 1997.
-
Avoiding NullPointerException
The terrible NullPointerException (NPE for short) is the most frequent Java exception occurring in production, according to a 2016 study. In this article we’ll explore the main techniques to fight it: the self-validating model and the Optional wrapper.
You should consider upgrading your entity model to either reject a null via self-validation or present the nullable field via a getter that returns Optional. The effort of changing the getters of the core entities in your app is considerable, but along the way, you may find many dormant NPEs.
-
7 Ways to Contribute to OpenJDK
A great many developers today are employed working with OpenJDK. If OpenJDK is the background source for your livelihood, you might want to contribute to future development of the OpenJDK.
There are many ways you can do this. In this article I outline 7 possibilities, ranging from minimal work (because you’re too busy to do much, but you’d like to do something) to intensive work (participating on OpenJDK development is everything you want to do, it’s more than a hobby, you want to contribute to the maximum extent possible).