An OutOfMemoryError: Direct buffer memory is a common error that Java developers encounter when working with applications that use large amounts of direct memory. Direct memory is allocated outside of the Java heap, and allows storing data that is needed by native libraries or I/O operations. In this tutorial, we will explore some common causes of this error and provide some troubleshooting steps.
How to tune the performance of Java 11 HttpClients
The Java 11 HttpClient API provides a lot of configuration options that you can use to tune its performance. In this tutorial, we will explore some of the most important ones.
Writing high performance Apache HTTP Clients
When it comes to consuming HTTP resources in Java applications, Apache HTTP Client is a popular choice for developers due to its ease of use, flexibility, and robustness. In this article, we will explore how to write a high-performance Java HTTP client using the Apache HTTP Client library.
How to solve “Too many Open Files” in Java applications
Scenario: Your application log displays the error message “Too many Open Files“. As a result, application requests are failing and you need to restart the application. In some cases, you also need to reboot your machine. In this article we will discuss File handling best practices and how to prevent File leaks in Java with proper resource management.
How to Fix the HTTP 415 “Unsupported Media Type” Error with JSON
If you’re a developer who has worked with web APIs, you might have come across the HTTP 415 “Unsupported Media Type” error. This error occurs when the server doesn’t support the media type that’s being used in the request. In this tutorial, we’ll discuss one common cause of the HTTP 415 error and how to fix it.
How to catch multiple Exceptions in Java
When working with Java, it’s common to encounter situations where you need to handle multiple exceptions. Fortunately, Java provides a simple and efficient way to do this using the
catch block. In this tutorial, we’ll explore how to catch multiple exceptions in Java, along with some tips and code snippets to help you get started.
Java Finally Block – When it is not executed ?
finally block in Java is used to define a section of code that will always be executed, regardless of whether an exception is thrown or caught. However, there are certain conditions under which the
finally block may not execute. In this tutorial, we’ll explore these conditions and provide some code snippets to illustrate them. Hint: read it through as this is a common interview question!
How to solve javax.net.ssl.SSLHandshakeException
If you’re encountering the “handshake_failure through SSLHandshakeException” error, it means there is an issue with the SSL/TLS handshake between the client and server. This can be caused by a variety of reasons such as outdated SSL/TLS protocol version, missing SSL/TLS certificates, or incorrect SSL/TLS configurations.
8 Things you can do with JBang but you can’t with Shell
Using Java as scripting language has become a popular option in the last few years thanks to the JShell tool. In this article we will learn how the JBang scripting tool can take your Java scripting power at another level.
JBang: Create Java scripts like a pro
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.