From 07a033c8a45edae70b94031ee047415616ff4deb Mon Sep 17 00:00:00 2001 From: Saibotk Date: Mon, 9 Dec 2024 14:01:07 +0100 Subject: [PATCH] fix(macos): java symlinks & path --- install-mac.sh | 4 ++++ macos/path.zsh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/install-mac.sh b/install-mac.sh index 3e57b36..be445b3 100755 --- a/install-mac.sh +++ b/install-mac.sh @@ -30,6 +30,10 @@ brew unlink gnupg flutter --disable-analytics +# Properly symlink openjdk java +# See https://formulae.brew.sh/formula/openjdk +sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk + # Enable corepack corepack enable diff --git a/macos/path.zsh b/macos/path.zsh index 324caa4..9cf03e1 100644 --- a/macos/path.zsh +++ b/macos/path.zsh @@ -11,3 +11,7 @@ export PATH="$HOME/.node/bin:$PATH" # Load dotfiles binaries for macos export PATH="$DOTFILES/macos/bin:$PATH" + +# Add Java binaries to path +# provides all openjdk binaries, otherwise some are not available +export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"