Last active
September 12, 2022 17:49
-
-
Save abroniewski/38b6ebccca12e9f88f821343a4c0fb13 to your computer and use it in GitHub Desktop.
Provides all terminal steps required to install jenv and adoptOpenJDK8 to run proM in terminal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############# | |
# All steps created following instructions on Medium from Chamika Kasun | |
# https://chamikakasun.medium.com/how-to-manage-multiple-java-version-in-macos-e5421345f6d0 | |
############# | |
#### BEFORE YOU RUN ###### | |
# change directory to where you proM files are | |
# this assumes you're using zsh shell. If not, you'll need to uncomment some code below | |
######################### | |
#### TO RUN ###### | |
# Copy paste code into terminal | |
################## | |
# Install homebrew. Uncomment below if needed: | |
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# isntall jenv -> java version manager | |
brew install jenv | |
# update shell configuration to set java PATH to be manage by jenv. | |
# If using bash, use the commented lines below | |
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(jenv init -)"' >> ~/.zshrc | |
# echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bashrc | |
# echo 'eval "$(jenv init -)"' >> ~/.bashrc | |
# restart terminal for setting changes to take effect | |
source ~/.zshrc | |
# verify install worked correcty. Ignore warnings, you'll see a "Jenv is correctly loaded" | |
jenv doctor | |
# these commands are needed if you are using maven | |
# ensure that JAVA_HOME is correct | |
jenv enable-plugin export | |
# now install AdoptOpenJDK8, which works with proM | |
brew install AdoptOpenJDK/openjdk/adoptopenjdk8 | |
# this will show you all of the versions of java you have installed | |
/usr/libexec/java_home -V | |
# now we add the java version you installed with brew in the jenv manager. | |
# this should work without edits if you are doing everything with defaults. | |
# otherwise use output from previous comment to update location | |
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home | |
# check to see the versions are now in jenv | |
jenv versions | |
# set the version of java in the current SHELL to be adoptopenjdk8 | |
jenv shell 1.8.0.292 | |
# confirm the current version in your shell | |
java -version | |
# now we can run the proM tool to see if it all worked! | |
sh ProMLite13.sh | |
# NOTE: You will need to run the code below everytime you want to start proM. | |
# You can also change the global version of java using: jenv global 1.8.0.292 | |
# jenv shell 1.8.0.292 | |
# sh ProMLite13.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment