Posts

Showing posts from February, 2023

How to Install Maven on Mac OS

  Installing Maven on MacOS Go to https://maven.apache.org/download.cgi and search for the right version. Download the tar file using command below $ wget https://dlcdn.apache.org/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz   Untar the file and move the folder to Mac OS Java location $ tar -xvf apache-maven-3.9.0-bin.tar.gz Set environment variable to be able to use java from any location by adding the following to .bash_profile $ vi $HOME/.bash_profile M2_HOME="/Users/xxx/Downloads/apache-maven-3.9.0" PATH="${M2_HOME}/bin:${PATH}" export PATH Restart the shell or source the bash_profile

How to Install Java on Mac OS

Installing Java on MacOS We will install OpenJDK which is free and doesn't need Oracle JDK licence. Go to https://jdk.java.net/19/ and search for the JDK version. Download the tar file using command below $ wget https://download.java.net/java/GA/jdk19.0.2/fdb695a9d9064ad6b064dc6df578380c/7/GPL/openjdk-19.0.2_macos-x64_bin.tar.gz Untar the file and move the folder to Mac OS Java location $ tar -xvf openjdk-19.0.2_macos-x64_bin.tar.gz $ sudo mv jdk-19.0.2.jdk /Library/Java/JavaVirtualMachines/ Set environment variable to be able to use java from any location by adding the following to .bash_profile $ vi $HOME/.bash_profile JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-19.0.2.jdk/Contents/Home" PATH="${JAVA_HOME}/bin:${PATH}" export PATH Restart the shell or source the bash_profile