I\'m using Apache James as email server for development purpose on mac Sierra - v 10.12.3
When I try to start/run it as super user
sudo ./run.sh
<
Resolved... the solution was to set the JAVA_HOME Environment Variable for Sudo. and this was done on: /etc/sudoers
. I used 'vi' to edit the file via terminal.
sudo visudo
and then adding the following line after the Default settings for Environment Variables:
Defaults env_keep += "JAVA_HOME"
That's all. To Check if the JAVA_HOME Environment Variable has been set correctly for sudo, I just typed this command in the terminal.
sudo printenv