This repository has been archived on 2022-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
manjaroConfiguration/installJava.sh

23 lines
867 B
Bash
Raw Normal View History

# Install SDKMAN
2021-11-14 20:18:08 +01:00
# Install dependencies
sudo apt update
sudo apt install curl zip unzip sed -y # set probably installed but it doesn't cost anything to double-check
curl -s "https://get.sdkman.io" | bash
2021-11-14 14:57:04 +01:00
source "$HOME/.sdkman/bin/sdkman-init.sh"
# Adding Fish support if fish is installed
if [ -x $HOME/.config/fish ] ; then
2021-11-14 20:29:58 +01:00
if [ ! -f $HOME/.config/fish/functions/fisher.fish ] ; then # Install fisher if not installed
curl -sL https://git.io/fisher | fish -c 'source && fisher install jorgebucaran/fisher'
fi
fish -c 'fisher install reitzig/sdkman-for-fish'
2021-11-11 22:48:11 +01:00
fi
echo -e "\nSDKMAN (Java install manager) installed!"
# Install Temurin build according with https://whichjdk.com/#adoptium-eclipse-temurin
2021-11-14 14:57:04 +01:00
sdk install java 17.0.1-tem
# upgrade to latest java version in case the version above isn't
sdk upgrade
echo -e "\nJava (Temurin) installed! 🎉"