mirror of
https://github.com/bisq-network/bisq.git
synced 2025-01-18 21:35:03 +01:00
Update scripts to JDK 11
This commit is contained in:
parent
8a06705bdf
commit
84084b5d75
@ -50,7 +50,7 @@
|
|||||||
javac -version
|
javac -version
|
||||||
```
|
```
|
||||||
|
|
||||||
If your Java version is not 11, check out scripts in the [scripts](../scripts) directory (or online at https://github.com/bisq-network/bisq/tree/master/scripts).
|
If you do not have JDK 11 installed, check out scripts in the [scripts](../scripts) directory or download it manually from https://jdk.java.net/archive/.
|
||||||
|
|
||||||
## Running Bisq
|
## Running Bisq
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ cd /D "%~dp0"
|
|||||||
|
|
||||||
title Install Java
|
title Install Java
|
||||||
|
|
||||||
set jdk_version=10.0.2
|
set jdk_version=11.0.2
|
||||||
set jdk_filename=openjdk-%jdk_version%_windows-x64_bin
|
set jdk_filename=openjdk-%jdk_version%_windows-x64_bin
|
||||||
set jdk_url=https://download.java.net/java/GA/jdk10/%jdk_version%/19aef61b38124481863b1413dce1855f/13/%jdk_filename%.tar.gz
|
set jdk_url=https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_windows-x64_bin.zip
|
||||||
|
|
||||||
if exist "%PROGRAMFILES%\Java\openjdk\jdk-%jdk_version%" (
|
if exist "%PROGRAMFILES%\Java\openjdk\jdk-%jdk_version%" (
|
||||||
echo %PROGRAMFILES%\Java\openjdk\jdk-%jdk_version% already exists, skipping install
|
echo %PROGRAMFILES%\Java\openjdk\jdk-%jdk_version% already exists, skipping install
|
||||||
@ -35,26 +35,16 @@ if exist "%PROGRAMFILES%\Java\openjdk\jdk-%jdk_version%" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo Downloading required files to %TEMP%
|
echo Downloading required files to %TEMP%
|
||||||
powershell -Command "Invoke-WebRequest %jdk_url% -OutFile $env:temp\%jdk_filename%.tar.gz"
|
powershell -Command "Invoke-WebRequest %jdk_url% -OutFile $env:temp\%jdk_filename%.zip"
|
||||||
if not exist "%TEMP%\7za920\7za.exe" (
|
|
||||||
:: Download 7zip ^(command line version^) in order to extract the tar.gz file since there is no native support in Windows
|
|
||||||
powershell -Command "Invoke-WebRequest https://www.7-zip.org/a/7za920.zip -OutFile $env:temp\7za920.zip"
|
|
||||||
powershell -Command "Expand-Archive $env:temp\7za920.zip -DestinationPath $env:temp\7za920 -Force"
|
|
||||||
)
|
|
||||||
|
|
||||||
echo Extracting and installing JDK to %PROGRAMFILES%\Java\openjdk\jdk-%jdk_version%
|
echo Extracting and installing JDK to %PROGRAMFILES%\Java\openjdk\jdk-%jdk_version%
|
||||||
"%TEMP%\7za920\7za.exe" x "%TEMP%\%jdk_filename%.tar.gz" -o"%TEMP%" -r -y
|
powershell -Command "Expand-Archive $env:temp\%jdk_filename%.zip -DestinationPath %TEMP%\openjdk-%jdk_version% -Force"
|
||||||
"%TEMP%\7za920\7za.exe" x "%TEMP%\%jdk_filename%.tar" -o"%TEMP%\openjdk-%jdk_version%" -r -y
|
|
||||||
md "%PROGRAMFILES%\Java\openjdk"
|
md "%PROGRAMFILES%\Java\openjdk"
|
||||||
move "%TEMP%\openjdk-%jdk_version%\jdk-%jdk_version%" "%PROGRAMFILES%\Java\openjdk"
|
move "%TEMP%\openjdk-%jdk_version%\jdk-%jdk_version%" "%PROGRAMFILES%\Java\openjdk"
|
||||||
|
|
||||||
echo Removing downloaded files
|
echo Removing downloaded files
|
||||||
if exist "%TEMP%\7za920.zip" (
|
|
||||||
del /Q %TEMP%\7za920.zip
|
|
||||||
)
|
|
||||||
rmdir /S /Q %TEMP%\openjdk-%jdk_version%
|
rmdir /S /Q %TEMP%\openjdk-%jdk_version%
|
||||||
del /Q %TEMP%\%jdk_filename%.tar
|
del /Q %TEMP%\%jdk_filename%.zip
|
||||||
del /Q %TEMP%\%jdk_filename%.tar.gz
|
|
||||||
|
|
||||||
:SetEnvVars
|
:SetEnvVars
|
||||||
echo Setting environment variables
|
echo Setting environment variables
|
||||||
|
@ -15,9 +15,9 @@ set -e
|
|||||||
unameOut="$(uname -s)"
|
unameOut="$(uname -s)"
|
||||||
case "${unameOut}" in
|
case "${unameOut}" in
|
||||||
Linux*)
|
Linux*)
|
||||||
JAVA_HOME=/usr/lib/jvm/openjdk-10.0.2
|
JAVA_HOME=/usr/lib/jvm/openjdk-11.0.2
|
||||||
JDK_FILENAME=openjdk-10.0.2_linux-x64_bin.tar.gz
|
JDK_FILENAME=openjdk-11.0.2_linux-x64_bin.tar.gz
|
||||||
JDK_URL=https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz
|
JDK_URL=https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
|
||||||
|
|
||||||
# Determine which package manager to use depending on the distribution
|
# Determine which package manager to use depending on the distribution
|
||||||
declare -A osInfo;
|
declare -A osInfo;
|
||||||
@ -52,13 +52,13 @@ case "${unameOut}" in
|
|||||||
update-alternatives --set javac $JAVA_HOME/bin/javac
|
update-alternatives --set javac $JAVA_HOME/bin/javac
|
||||||
;;
|
;;
|
||||||
Darwin*)
|
Darwin*)
|
||||||
JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-10.0.2.jdk/Contents/Home
|
JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
|
||||||
JDK_FILENAME=openjdk-10.0.2_osx-x64_bin.tar.gz
|
JDK_FILENAME=openjdk-11.0.2_osx-x64_bin.tar.gz
|
||||||
JDK_URL=https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_osx-x64_bin.tar.gz
|
JDK_URL=https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz
|
||||||
if [ ! -d "$JAVA_HOME" ]; then
|
if [ ! -d "$JAVA_HOME" ]; then
|
||||||
if [[ $(command -v brew) == "" ]]; then
|
if [[ $(command -v brew) == "" ]]; then
|
||||||
echo "Installing Hombrew"
|
echo "Installing Homebrew"
|
||||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
else
|
else
|
||||||
echo "Updating Homebrew"
|
echo "Updating Homebrew"
|
||||||
brew update
|
brew update
|
||||||
@ -66,10 +66,10 @@ case "${unameOut}" in
|
|||||||
|
|
||||||
brew install curl
|
brew install curl
|
||||||
curl -L -O $JDK_URL
|
curl -L -O $JDK_URL
|
||||||
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-10.0.2.jdk | sudo bash
|
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk | sudo bash
|
||||||
gunzip -c $JDK_FILENAME | tar xopf -
|
gunzip -c $JDK_FILENAME | tar xopf -
|
||||||
sudo mv jdk-10.0.2.jdk/* /Library/Java/JavaVirtualMachines/openjdk-10.0.2.jdk
|
sudo mv jdk-11.0.2.jdk/* /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk
|
||||||
sudo rmdir jdk-10.0.2.jdk
|
sudo rmdir jdk-11.0.2.jdk
|
||||||
rm $JDK_FILENAME
|
rm $JDK_FILENAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -80,4 +80,3 @@ case "${unameOut}" in
|
|||||||
*)
|
*)
|
||||||
esac
|
esac
|
||||||
java -version
|
java -version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user