【发布时间】:2017-04-03 11:14:39
【问题描述】:
我在 mac Sierra - v 10.12.3 上使用 Apache James 作为电子邮件服务器进行开发
当我尝试以超级用户身份启动/运行它时
sudo ./run.sh
我收到以下错误:
ERROR: JAVA_HOME not found in your environment.
Please, set the JAVA_HOME variable in your environment to match the
location of the Java Virtual Machine you want to use.
当我尝试在不使用 sudo 的情况下运行它时,我得到以下信息:
Using PHOENIX_HOME: /Users/myUserName/Dev/james-2.3.2.1
Using PHOENIX_TMPDIR: /Users/myUserName/Dev/james-2.3.2.1/temp
Using JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
Running Phoenix:
Phoenix 4.2
James Mail Server 2.3.2.1
Remote Manager Service started plain:4555
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component named "pop3server" failed to pass through the Starting stage. (Reason: java.net.BindException: Permission denied (Bind failed)).
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
到目前为止,我知道 JAVA_HOME 变量已正确设置。
当我在终端输入 $JAVA_HOME 时,我得到:
-bash: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home: is a directory
在我拥有的 .profile 和 .bash_profile 文件中:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
知道原因是什么吗?
【问题讨论】:
标签: java macos macos-sierra java-home james