Skip to main content

Why is OT installation failing on my Mac even with the most up to date version of JAVA? - Knowledgebase / ALMA Observing Tool (OT) - ALMA Science

Why is OT installation failing on my Mac even with the most up to date version of JAVA?

Authors list

When running

./setup-unix.sh

gives the error:

Verifying that you have an acceptable version of Java installed... Java version 1 found
failed
Problem: The "java" executable in your $PATH (at /usr/bin/java) is too old: Java 1
Please install a more recent version of Java (http://java.com), or correct your $PATH.


This error can be resolved by following steps 1 & 2 of the Mac OS section on the OT Tarball download page.


Apple has introduced a security measure which makes it difficult to install unsigned software. Therefore we recommend the following steps.

1. Install the Java runtime environment (JRE) from the eclipse foundation. They provide JRE for both modern (Apple aarch64 CPU) and older (Intel x64 CPU) generation hardware. It is advisable to download the ‘.pkg’ package because it is easier to install on your system. You can find the latest JRE 17 release at the following Eclipse JRE web page

2. After downloading the JRE software package. Double click on the file and it will open an installer application. Follow the instructions in the installer to complete the installation of JRE.


If you still are unable to get past the error message the path is likely the issue.

Try this

/usr/libexec/java_home -V

You should see

/Library/Java/JavaVirtualMachines/temurin-17.jre/Contents/Home

If so, add that to your path in your bash profile (~/.bashrc, ~/.bash_profile, etc) or z shell profile (~/.zshrc, ~/.zsh_profile, etc) depending on which environment you use

export JAVA_HOME=$(/usr/libexec/java_home -v 17)
export PATH=$JAVA_HOME/bin:$PATH

Save the file and then source the profile

source ~/.zshrc # or other equivalent