Java Utility Package (Freeware)
A high-performance and user-friendly programming toolkit tailored for Java backend developers
Follow the development at Mastodon #JavaUtil.
If you have any questions or feedback, feel free to contact me at andy.brunner@k43.ch
Features
Advanced Logging Capabilities Simplify logging with an easy-to-use framework based on the standard Java Logger. Includes enhanced logging handlers (JDBC and SMTP) and versatile logging formatters (Tabular Text, CSV, XML, JSON, and YAML).
Database Integration Seamlessly access any JDBC-compliant database and retrieve data in multiple formats, including JSON, YAML, CSV, XML, tabular, or raw Java objects.
Email Functionality Create and send MIME multipart SMTP messages with support for text, HTML content, and file attachments.
HTTP/HTTPS Support Perform HTTP/HTTPS calls with comprehensive support for all major HTTP methods.
TCP Server and Client Support Start a TCP server (TLS or non-TLS) to handle client requests using custom-written classes or connect as a TCP client to a server (TLS or non-TLS) to read and write data efficiently.
Thread Management Leverage a convenient class for starting and terminating Java threads with ease.
File Operations Read and write files in various formats, including byte streams, character streams, Java Properties, and JSON data.
Utility Methods Access a collection of static utility functions for common programming tasks.
GraalVM Support The generation of native executable code with GraalVM is supported by including the necessary reflection definitions in the distributed JAR file.
HTTP Example
JDBC Example
Prerequisites
Java SE 1.8 (Java 8) or higher
JDBC Driver (used by the KDB class)
Java Mail API/Jakarta EE (used by the KSMTPMailer and KLogSMTPHandler class)
org.json.JSONObject (used by the KFile class)
Installation / Usage
Download the latest Java JAR file
Add import ch.k43.util.* statement in your Java code
Make sure that the file ch.k43.util.jar can be found at compile time and in the classpath at runtime
Test Installation
You may test the package by running the HelloWorld program, which is part of the distribution jar.
See the section Tips / FAQ on how to create a native binary executable with GraalVM.
Motivation for this toolkit
In my professional life as an administrator and developer, I have benefited many times from countless freeware and open source products. It is therefore natural for me to also contribute to this community (see my other freeware projects).
This collection of Java classes was created in the course of various projects and will be further developed (see Design Goals). I hope that this tool will also serve you well.
Freeware / Unlicensed
This software is freeware and unlicensed. It was created with love and passion in the beautiful country of 🇨🇭 Switzerland. This software shall be used for Good not Evil. As far as I know, no animal was harmed in the making of this software 😊
Last updated