Java

| comments

Contents:

Resources #

Core functionality #

SQL libraries #

  • Hibernate: ORM, and I hate ORMs;
  • JDBI: light layer on top of JDBC, string-based queries;
  • jOOQ: type safe SQL, alternative to Hibernate;

Database migrations #

Frameworks #

Tools #

  • Gradle: the accepted Maven alternative;
  • JBang: scripting with Java;

Setup #

SDKMan! #

Install:

https://sdkman.io/install

To list available Java SDKs:

sdk list java

To install:

# OpenJDK
sdk install java 11.0.2-open

# GraalVM
sdk install 22.2.r17-grl

# Oracle
sdk install 17.0.4-oracle

After the installation of GraalVM, add this to .zshrc:

export GRAALVM_HOME=$HOME/.sdkman/candidates/java/22.2.r17-grl/

Also install the native-image:

${GRAALVM_HOME}/bin/gu install native-image

OpenJDK Builds #

Noteworthy:

Also see: JDK distributions.

Dependency injection / CDI #