avatar

Andres Jaimes

How to install Java and Maven on FreeBSD

FreeBSD is a powerful and reliable operating system that is widely used by developers and system administrators. If you are a Java developer, you will need to install both Java and Maven on your FreeBSD system to build and run your Java applications. …

How to install postgres on FreeBSD

PostgreSQL, also known as Postgres, is a popular open-source relational database management system (RDBMS) that is widely used by developers and organizations around the world. FreeBSD, a free and open-source operating system, is well-known for its …

Common tasks when working with MySQL

How to install MySQL server in Ubuntu

It’s pretty simple:

1sudo apt-get install mysql-server

How to connect to MySQL using Java

This is a useful and simple snippet:

 1import java.sql.Connection;
 2import java.sql.DriverManager;
 3public class Test { …

Recommended libraries for Java

This article lists a curated list of Java libraries that I have used over the years for different projects. They are all well documented, and for most of them, plenty of examples can be found on the web.

Apache Commons Email

Commons Email

Commons …

PlayFramework – Java

So far I have really liked this concept. The only con is that some times is difficult to find full examples that use the latest version.

Installing sbt

We need sbt for compiling and running Play applications.

brew install sbt@1

Executing a first …

How to run a custom update using Java JPA

From time to time it is necessary to execute a query without using Java’s JPA infrastructure.

In order to do it, we have to define a NamedQuery to execute. In this example, I will run an update against the database.

@Entity
@NamedQueries ({ …

Quick lessons on working with Java’s BigDecimal

Today I bring an example of the different results you can expect when using Java’s BigDecimal class. From instantiation to applying different arithmetic operations, it is important to understand how they affect the resulting instances.

The following …