You will need Java installed if you want to:
Open a terminal window and execute java -version
.
If it returns with something like this, Java is already installed.
saiko@invader ~ % java -version openjdk version "14.0.1-internal" 2020-04-14 OpenJDK Runtime Environment (build 14.0.1-internal+14-adhoc..jdk14u-jdk-14.0.17) OpenJDK 64-Bit Server VM (build 14.0.1-internal+14-adhoc..jdk14u-jdk-14.0.17, mixed mode, sharing)
Install Java using your distribution's package manager. This step will vary across distros, so in case it is not listed here, please refer to your distro's documentation.
Convention: commands starting with a #
must be run with privilges like so sudo [command] [options]
.
Install the latest JRE with this command:
# pacman -S jre-openjdk
If you're only running a server without the need for a graphical environment, the headless JRE is enough:
# pacman -S jre-openjdk-headless
If you want to also develop mods, you need to install the JDK instead.
# pacman -S jdk-openjdk
For more information, see the Arch Linux Wiki article.
Install the JRE for Java 8 with this command:
# dnf install java-1.8.0-openjdk
If you're only running a server without the need for a graphical environment, the headless JRE is enough:
# dnf install java-1.8.0-openjdk-headless
If you want to also develop mods, you need to install the JDK instead.
# dnf install java-1.8.0-openjdk-devel
For more information, see the Fedora Wiki article.
Install the latest JRE with this command:
# emerge -a jre
If you're only running a server without the need for a graphical environment, the headless JRE is enough, for that you can enable USE=headless-awt and then emerge a JRE that supports it, such as dev-java/openjdk or dev-java/openjdk-jre-bin for the precompiled version:
# euse -E headless-awt # or manually change make.conf/package.use # emerge -a dev-java/openjdk
If you want to also develop mods, you need to install the JDK instead.
# emerge -a jdk
For more information, see the Gentoo Wiki article.
Install the latest JRE with this command:
# xbps-install openjdk-jre
If you want to also develop mods, you need to install the JDK instead.
# xbps-install openjdk