In this post I will keep some useful Java hacks and one-liners which are useful in every day programming
Here is my JBang cheatsheet which can help as a reference to code self-contained source-only Java programs with unmatched ease.
This tutorial will discuss how to fix one of the most common errors for Java applications: “Too many open files“. The error Java IOException “Too many open files” can happen on high-load servers and it means that a process has opened too many files (file descriptors) and cannot open new ones. In Linux, the maximum … Read more
This tutorial provides a detailed exposere on writing high performance Java HTTP Client with Apache HTTP Client library. Out of the box, Apache HttpClient is configured to provide high reliability and standards compliance rather than raw performance. There are however several configuration tweaks and optimization techniques which can significantly improve the performance of applications using … Read more
This article discusses how to solve the error “java.lang.OutOfMemoryError: Compressed class space error” which is an OutOfMemory error that can pop up on a 64-bit platform. Starting with Java 1.8, loaded classes are confined to a native space called the “Compressed Class Metadata Space” or CCMS. The default size for the Compressed Class Metadata Space … Read more
How to configure the HeapDumpOnOutOfMemoryError parameter on JBoss EAP or WildFly ? It’s pretty simple. The -XX:+HeapDumpOnOutOfMemoryError command-line option tells the HotSpot VM to generate a heap dump when an allocation from the Java heap or the permanent generation cannot be satisfied. Just like any other JVM parameters, it can be added in the standalone.conf … Read more
In this tutorial we will show how to measure the time spent on the execution of a Java method by using Byteman tool. There are several tools or product which can trace the execution of Java methods and calculate how much time you are spending in the single methods of your application. This is a … Read more
JBang is a scripting tool which allows to run Java application with minimal set up, without the need of having a project configuration. In this tutorial we will learn how to use it to run a simple Java application and then we will be looking at a more complex example, which starts a Quarkus application. … Read more