Maven crashes when trying to compile a project “Error executing Maven.”

I had the same problem in Ubuntu/Mint 20.04 when using OpenJDK 17.
I found out that with OpenJDK 11 works well.

Key elements to consider:

# Have version 11 installed
sudo apt install openjdk-11-jdk
# Update alternatives to use version 11 as default
sudo update-alternatives --config java
# Set the JAVA_HOME environment variable accordingly
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)