Even though JAVA_HOME is set correctly, still Apache James fails to start with message ERROR: JAVA_HOME not found in your environment.
I have correctly installed latest version of JDK 8 (jdk1.8.0_231) and running all the IDEs (NetBeans) and Servers (Payara 5) successfully. However, Apache James (latest V 2.3.2.1) never picks the variable value for JAVA_HOME
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home
So far so good. Now I will run Apache James
sudo <path-to-james>/bin/run.sh
ERROR: JAVA_HOME not found in your environment.
Which is rather strange!
Any thoughts would be greatly appreciated.
Expected - I expect Apache James to run straightway
Actual - Annoying error of JAVA_HOME not found!