When running runAll.sh I get the following error:
sh runAll.sh start
Spawning TeamCity restarter in separate process
TeamCity restarter running with PID 8634
Starting TeamCity build agent...
Java executable of version 1.5 is not found:
- Java executable is not found under the specified directories: '', '', '/Users/userName/TeamCity/buildAgent/bin/../jre', '/Users/userName/TeamCity/buildAgent/bin/../../jre'
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Java executable is not found using 'java_home' utility
- Java executable is not found in the default locations
- Java executable is not found in the directories listed in the PATH environment variable
Please make sure either JAVA_HOME or JRE_HOME environment variable is defined and is pointing to the root directory of the valid Java (JRE) installation
Environment variable FJ_DEBUG can be set to enable debug output
Java not found. Cannot start TeamCity agent. Please ensure JDK or JRE is installed and JAVA_HOME environment variable points to it.
However, JAVA_HOME is set I can call echo $JAVA_HOME and see it. I can also call java -version.
In addition I can even run the Tomcat server directly using catalina.sh
I have tried all the different way of setting up the JAVA_HOME environment variable with no luck. What am I missing?