Java environment under the system set up win

 

The first step is to configure the local learning Java development environment, learning the most basic desktop development, win7 an example below to configure the Java development environment, the installation of JDK is installed by default JRE, follow the prompts to install it.

First, download the appropriate system Quguan network version of JDK, Download: http://www.oracle.com/technetwork/java/javase/downloads/index.html will see the following page after opening the link:

At this time, the first can click to download, click the download page, as shown below:

First choice: Accept License Agreement radio button consent agreement, then click below to download the corresponding version, I was Windows 64-bit, so I chose the back windows x64 jdk-8u45-windows-x64.exe, then double-click the installer to download ,See below:

Click Next, then select the installation location, according to the prompts to install, basically no settings, the installation process also installs JRE, Java Runtime Environment is, after a while the installation is completed.

After finished, click the Close button.

Now JDK and JRE environment has been installed, the following configuration environment variable, so that Java command can be executed directly.

Right-click the desktop icon, click Properties, open the computer properties screen, you can click the Start menu, select "Control Panel", click on "System" to open, you can also use the Run box, run: control.exe / name Microsoft.System properties dialog box opens, as shown below:

Then click "Advanced System Settings"

Click the "Environment Variables", into the environment variable settings interface, first of all remember our JDK installation path, as shown below, is my C: \ Program Files \ Java \ jdk1.8.0_45

This depends on your own settings.

To set up the stability of our system is the following variables column, click the "New" button,

Enter the variable name: JAVA_HOME

变量值为你的安装路径,我这里填:C:\Program Files\Java\jdk1.8.0_45然后单击"确定"按钮。

 

同样操作我们新建变量:CLASSPATH

变量值:.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar

同样强调,最前面有个".",不要忘记。

然后找到Path选项,这个已经存在,单击"编辑",在最后输入:;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin

现在设置完毕,最后单击"确定"保存所有设置,然后再次单击"确定"退出系统属性。

现在环境变量配置完毕了,我们可以测试一下,运行cmd,分别输入:java -version,java,javac可以看到结果说明JDK安装并配置完毕。

Guess you like

Origin www.cnblogs.com/qingmuchuanqi48/p/11184650.html