JDBC / NOTES</>↗JDBC15 Jul 2024
In this tutorial, we’ll guide you through the process of inserting records into an MS Access Database. In the code snippet below we are using the UCanAccess JDBC driver, you can find the Maven dependencies at the end of this tutorial. Setting Up The Connection Firstly, we need to set up a connection to our […]
JDBC / NOTES</>↗JDBC15 Jul 2024
UCanAccess is a pure Java JDBC Driver implementation which allows Java developers and JDBC client programs to read and write Microsoft Access database files (.mdb and .accdb). In this tutorial, we will demonstrate how to configure a project with UCanAccess and create a simple Java application to select data from an MS Access database. Establishing […]
SPRING JDBC / NOTES</>↗Spring JDBC24 Jun 2024
Spring JDBC simplifies database operations by providing an abstraction layer over traditional JDBC. In this blog post, we’ll walk through a practical example of using Spring JDBC to insert a record into a database and obtain the generated key for the newly inserted record. First, let’s look at the complete code snippet: package org.kodejava.spring.jdbc; import […]
IO / NOTES</>↗IO13 Jun 2024
The following code snippet show you how to recursively rename files with a specific suffix. In this example we are renaming a collection of resource bundles files which ends with _in.properties into _id.properties. The code snippet also count the number of files affected by the process. We use the Files.move() method to rename the file, […]
UBUNTU / NOTES</>↗Ubuntu12 Jun 2024
In Java 17, the Locale for Indonesia changed from in_ID to id_ID. In my project, the resource bundle files are named with the suffix _in.properties which is unrecognized by Java 17. To resolve this issue, I need to create copies of these resource bundle files that ends with _id.properties. Here are solutions for both Linux/macOS […]
LOGGING / NOTES</>↗Logging08 Jun 2024
When creating a program in Java, we are mostly, if not always, add logging mechanism in our program. This log can be use to add debug information to our program, which can help us when problem occurs in our program. We usually add log message to the start of our methods to show the value […]