-
Notifications
You must be signed in to change notification settings - Fork 92
Installation
You might want to use our .deb
packages, if you're on Debian or Ubuntu:
sudo bash
apt-get update
apt-get install -y --no-install-recommends ca-certificates gnupg2
rm -rf /var/lib/apt/lists/*
export GNUPGHOME="$(mktemp -d)"
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys CACB9FE09150307D1D22D82962754C3B3ABCFE23
gpg --batch --export --armor 'CACB 9FE0 9150 307D 1D22 D829 6275 4C3B 3ABC FE23' > /etc/apt/trusted.gpg.d/sapmachine.gpg.asc
gpgconf --kill all && rm -rf "$GNUPGHOME"
echo "deb http://dist.sapmachine.io/debian/$(dpkg --print-architecture)/ ./" > /etc/apt/sources.list.d/sapmachine.list
apt-get update
apt-get -y --no-install-recommends install sapmachine-21-jdk
rm -rf /var/lib/apt/lists/*
export JAVA_HOME=/usr/lib/jvm/sapmachine-21
On RPM-based systems, you can use our .rpm
packages.
sudo bash
dnf -y install ca-certificates curl
curl -L -O https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.4/sapmachine-jdk-21.0.4-1.x86_64.rpm
dnf -y install sapmachine-jdk-21.0.4-1.x86_64.rpm
sudo bash
yum -y install ca-certificates curl
curl -L -O https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.4/sapmachine-jdk-21.0.4-1.x86_64.rpm
yum -y install sapmachine-jdk-21.0.4-1.x86_64.rpm
sudo bash
zypper -n install ca-certificates curl
curl -L -O https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.4/sapmachine-jdk-21.0.4-1.x86_64.rpm
zypper -n --no-gpg-checks install ./sapmachine-jdk-21.0.4-1.x86_64.rpm
- Download the archive and unpack it to an arbitrary location in the file system
- Set environment variable
JAVA_HOME
to the root directory of the extracted archive (e.g./<...>/sapmachine-jdk-21.0.4
) - Add
$JAVA_HOME/bin
to the environment variablePATH
A very convenient way to install SapMachine versions and keep them up to date is to use the SapMachine Manager. Install it from GitHub, then install the SapMachine version you need (default is the latest LTS) and SapMachine Manager will keep it up to date for you from there on. You can as well opt out from the autoupdate.
![sapmachine](https://private-user-images.githubusercontent.com/26298889/327345325-dcc3ee1c-becd-4aa3-9715-b71ef13a0cec.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwMTMxNDUsIm5iZiI6MTcyNjAxMjg0NSwicGF0aCI6Ii8yNjI5ODg4OS8zMjczNDUzMjUtZGNjM2VlMWMtYmVjZC00YWEzLTk3MTUtYjcxZWYxM2EwY2VjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDAwMDA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmOGFkOWUzNDcxZjgzZWJkYmMxYmExZjJhMGMzMzg2MWEyODY0NzY3ZDk5MTdmZjM4YTFjNjM5NGVlY2IwNzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DBR7CtOYm8UiZEs4CKVHJd7sExKotbzALVm0LrAw-is)
Homebrew is another way to install SapMachine. Homebrew is a package manager for Mac. When you are familiar with it and maybe even use it already, you can manage your SapMachine installations with it as well.
At first, if you have not already done it, install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
In case you did not just install it, you should update its contents:
brew update
Homebrew supports the installation of the latest released SapMachine by default:
brew install sapmachine-jdk
To install other versions of SapMachine you can use our tap.
Tap via:
brew tap sap/sapmachine
List available casks or versions of SapMachine to choose from:
brew search sapmachine
Install a cask by name:
brew install --cask <cask>
Version | JDK | JRE |
---|---|---|
SapMachine Released | sapmachine<MAJOR>-jdk |
sapmachine<MAJOR>-jre |
SapMachine Early Access | sapmachine<MAJOR>-ea-jdk |
sapmachine<MAJOR>-ea-jre |
SapMachine EA builds are not signed/notarized, so you must disable the quarantine flag during installation via the --no-quarantine
option. Examples:
brew install --cask sapmachine11-jre
brew install --cask sapmachine17-jre
brew install --cask sapmachine21-jre
brew install --cask --no-quarantine sapmachine23-ea-jdk
Alternatively, you can download and unpack (double-click in finder) the SapMachine archive for macOS to an arbitrary location in the file system. You may want to move the resulting directory to /Library/Java/JavaVirtualMachines
(admin privileges required). If you do so, /usr/libexec/java_home -V
will show SapMachine. Moreover, if SapMachine is the most recent JDK, the java
command in the shell will use it. You can try this with java -version
.
If you prefer not to have SapMachine integrated in macOS' Java Framework, make sure to set JAVA_HOME
to the root directory of the extracted archive (e.g. /<...>/sapmachine-jdk-21.0.4
) and PATH
(i.e. $JAVA_HOME/bin
) environment variables.
Using the Windows Installer (download the MSI package) is the simplest way to install SapMachine on Windows.
Alternatively, you can:
- Download the zip archive and unpack it to an arbitrary location in the file system
- Add the System variable
JAVA_HOME
and set it to the root directory of the extracted archive (e.g.C:\<...>\sapmachine-jdk-21.0.4
) - Edit the System variable
PATH
and add%JAVA_HOME%\bin
to thePATH
variable separated from the previous path by a semicolon.
SDKMAN! now supports SapMachine. Because of the current length limit in the SDKMAN! version string, SapMachine has to be abbreviated as sapmchn
. Installing with SDKMAN! is as simple as:
### install SapMachine17
sdk install java 17.0.12-sapmchn
### install SapMachine21
sdk install java 21.0.4-sapmchn