How to install Java on Debian

Post Reply
User avatar
myVesta
Site Admin
Posts: 921
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Need to install Java on your Debian system quickly and efficiently? This concise guide is tailored for users who want to set up Java without going through complex steps. This method installs the default JRE and JDK, which are typically sufficient for most Java applications and development needs.

To avoid conflicts with any pre-existing Java installations, first, check if Java is already installed on your system and which version it is. Use the command:

Code: Select all

java -version
Ensure your package list is up to date to install the latest version of Java available in the Debian repository:

Code: Select all

apt update
Install both the Java Runtime Environment (JRE) and the Java Development Kit (JDK) with this single command:

Code: Select all

apt install -y default-jre default-jdk
With these two commands, you have successfully installed Java on your Debian system along with myVesta CP.
Post Reply