Skip to content

Commit

Permalink
switched to SapMachine OpenJDK
Browse files Browse the repository at this point in the history
  • Loading branch information
wechris committed Feb 17, 2019
1 parent d1cff48 commit d9438c4
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions install/gnome.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
echo "install Gnome..."
sudo zypper ar obs://GNOME:/STABLE:/3.16/openSUSE_13.2/GNOME:STABLE:3.16
sudo zypper mr -p 98 -r GNOME:STABLE:3.16
Expand All @@ -11,11 +12,23 @@ sudo ln -svf /usr/lib/systemd/system/graphical.target /etc/systemd/system/defaul
sudo chkstat --system --set

echo "install JAVA..."
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.rpm
sudo zypper --non-interactive remove --force-resolution 'java*'

wget "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jdk-11.0.2_linux-x64_bin.tar.gz" -O /home/vagrant/sapmachine-jdk-11.0.2_linux-x64_bin.tar.gz && touch java.is.done
if [ ! -d /usr/java ]; then
sudo mkdir /usr/java
fi
sudo tar -xzf /home/vagrant/sapmachine-jdk-11.0.2_linux-x64_bin.tar.gz -C /usr/java

sudo ln -s /usr/sbin/update-alternatives /usr/sbin/alternatives
sudo rpm -ivh --nodeps /home/vagrant/jdk-8u191-linux-x64.rpm
sudo alternatives --install "/usr/bin/java" "java" "/usr/java/sapmachine-11.0.2/bin/java" 1
sudo update-alternatives --set java /usr/java/sapmachine-11.0.2/bin/java

sudo alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.8.0_191-amd64/bin/java" 1
sudo update-alternatives --set java /usr/java/jdk1.8.0_191-amd64/bin/java
wget "https://download2.gluonhq.com/openjfx/11.0.2/openjfx-11.0.2_linux-x64_bin-jmods.zip" -O /home/vagrant/openjfx-11.0.2_linux-x64_bin-jmods.zip && touch fx.is.done
sudo unzip /home/vagrant/openjfx-11.0.2_linux-x64_bin-jmods.zip -d /home/vagrant/
sudo cp -r /home/vagrant/javafx-jmods-11.0.2/* /usr/java/sapmachine-11.0.2/jmods
sudo touch /usr/java/sapmachine-11.0.2/lib/javafx.properties

#Cleanup
sudo rm -rf /home/vagrant/sapmachine-jdk-11.0.2_linux-x64_bin.tar.gz
sudo rm -rf /home/vagrant/openjfx-11.0.2_linux-x64_bin-jmods.zip
sudo rm -rf /home/vagrant/javafx-jmods-11.0.2

0 comments on commit d9438c4

Please sign in to comment.