如何在windows7(64位)中设置JAVA_HOME变量 [英] How to set JAVA_HOME variable in windows7(64-bit)

查看:286
本文介绍了如何在windows7(64位)中设置JAVA_HOME变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对设置JAVA_HOME变量有疑问。 JAVA_HOME是应该指向jdk目录还是hre目录?

I have a doubt regarding setting JAVA_HOME variable. Whether JAVA_HOME should point to jdk directory or hre directory??

推荐答案

你不需要 JAVA_HOME ,只需要确保您的 PATH 变量包含 jdk\bin 目录。
You do not need JAVA_HOME, just make sure that your PATH variable includes the jdk\bin directory.


下载并启动安装程序后一直到自定义设置页面。您会注意到默认路径将JDK安装到Program Files文件夹。由于scons的问题,我们将在没有空格的路径中安装Java。为此,我们需要将程序文件从JDK的路径中取出。为此,单击更改...按钮

编辑路径,以便Program Files消失。

导航到系统属性对话框,高级设置选项卡,然后单击**环境变量... *按钮。

为JAVA_HOME添加一个新的系统变量,单击系统变量部分中的新建... ...

选择Path系统变量,然后单击Edit ..

滚动到路径的开头并插入%JAVA_HOME%bin;
After downloading and launching the installer work your way through to the Custom Setup page. You'll notice that the default path installs the JDK to the Program Files folder. Due to the issue with scons we are going to install Java in a path with no spaces. To do so we need take Program Files out of the path to the JDK. To do that, click on the Change... button
Edit the path to so that Program Files is gone.
Navigate to the System Properties Dialog, Advanced Settings tab, then click the **Environment Variables...* button.
Add a new System Variable for JAVA_HOME, buy clicking on New... in the System Variable section.
Select the Path system variable and click Edit..
Scroll to the beginning of the path and insert %JAVA_HOME%bin;


查看关于JAVA_HOME的这篇好文章在此设置 - http://goo.gl/pY4WE1
See this good article on "JAVA_HOME" Setup here – http://goo.gl/pY4WE1


这篇关于如何在windows7(64位)中设置JAVA_HOME变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆