</>CodexBash
All articles
Setup guides

Install Java on Ubuntu

Install a Java JDK on Ubuntu or Debian with apt, or the Eclipse Temurin repository for the newest LTS, switch between versions with update-alternatives, set JAVA_HOME properly, and fix the usual errors.

CodexBash, , 4 min read

Ubuntu makes installing Java easy: one apt command gets you a working JDK. The questions come afterwards: which version did that install, how do you get a newer one, how do you switch between several, and where does JAVA_HOME go? This guide answers all of them for Ubuntu and other Debian-based systems, including WSL on Windows.

Sign in to read the rest

The whole 4 minute article is free with an account, along with every problem, lesson and tutorial. No card.