/Manager.sh: line 48: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/jre/bin/java: No such file or directory
search cancel

/Manager.sh: line 48: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/jre/bin/java: No such file or directory


Article ID: 216196


Updated On:


CA API Gateway


  •  getting this error when launch Policy Manager from Macbook


./Manager.sh: line 48: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/jre/bin/java: No such file or directory

  • checked java version 11,16, none of them have this path ../Contents/Home/jre/bin/java

what else need to be in order to run linux version of Policy Manager on Mac?


Release : 10.0

Component : API GATEWAY


Policy Manager support AdoptOpenJDK 8 on Mac Only.

The following solution allows to set AdoptOpenJDK 8 for Policy Manager but maintaining other JDK versions installed.

1. to have multiple Java versions on MA OS.

put the following lines .bash_profile (or .zshrc for MacOS 10.15+) which makes it really convenient to switch :

alias j12="export JAVA_HOME=`/usr/libexec/java_home -v 12`; java -version"
alias j11="export JAVA_HOME=`/usr/libexec/java_home -v 11`; java -version"
alias j10="export JAVA_HOME=`/usr/libexec/java_home -v 10`; java -version"
alias j9="export JAVA_HOME=`/usr/libexec/java_home -v 9`; java -version"
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version"
alias j7="export JAVA_HOME=`/usr/libexec/java_home -v 1.7`; java -version"

2. After inserting, execute $ source .bash_profile

3. Switch to Java 8 by typing the following:

$ j8

java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

2. Also add the export line at top of Manager.sh file

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0)