我得到了#34; JAVA_HOME没有设置"即使我已正确设置它(尝试安装Vagrant时)也会出错

时间:2018-01-17 13:56:04

标签: java windows vagrant virtualbox java-home

我正在尝试安装一个java项目。我已经下载了Vagrant和VirtualBox。我正按照here步骤设置我将要开展的项目。

这是我执行" vagrant up" cmd中的命令:

c:\Users\Giannis\Desktop\1dv600-lab-java>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...

==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
    default: Running: inline script
    default: ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
    default:
    default: Please set the JAVA_HOME variable in your environment to match the
    default: location of your Java installation.

The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

现在,在cmd窗口中运行以下命令

java -version
javac -version
echo %JAVA_HOME%

我收到了应该收到的消息。 那么我的Java安装有什么问题?

0 个答案:

没有答案
相关问题