Java environment basic configuration

xiaoxiao2021-03-06  24

1, download and install JDK5.0 or JDK1.4.2

Don't have any questions about the version number, according to my understanding, JDK5.0 is JDK1.5, is an important upgrade of JDK1.4.2, adding a lot of new language features, why is it called 5.0 without call 1.5, I think possible It is for commercial considerations, this is not necessary to pay more, I always like new things, so downloading JDK5.0,

The address is: http://java.sun.com/j2se/1.5.0/download.jsp

Figure:

Documentation is also downloaded, otherwise many help can't see it.

After the download is complete, you may encounter the same problem with me, the downloaded file has a strange name, and can not run, this problem is harvested for several hours, and later do it, now tell everyone how to solve: Change the downloaded JDK file to the name, and change the extension to .exe can be installed; change the downloaded documentation file, change the extension to .zip, then decompress, so that the first step is OK . I set the installation path to D: / Java, you can set your own situation, all configurations make corresponding changes, there will be two folders after installation, one is JDK, one is JRE, behind us Will use JDK. As shown below:

2. Configuring environment variables After installing JDK, set the environment variable, right-click My Computer -> Properties -> Advanced -> Environment Variable My Computer is the newly built variable as follows JavaHome = D: / java / jdk1. 5.0_02 classpath =.; D: /java/jdk1.5.0_02/lib Note: The most in front of the point cannot be edited less Path, add it at the last side; d: /java/jdk1.5.0_02/bin

Your specific installation location may be different from me, and can be modified according to the corresponding location. After the environment variable is configured, you can run two commands of Java and Javac under the console. If the parameter prompt help, the configuration is correct. 3. Of course, I need a good IDE tool, I recommend the most fireful Eclipse

Download address: http://www.eclipse.org/downloads/index.php

After downloading, you can use it directly, you can use it, you don't need to install, the welcome interface is cool, as shown:

Set the path to JDK, as shown in the menu Select Window -> Preferencees

In the pop-up dialog box, find Java-> Installed Jres, we can see that a default configuration is JRE, click the Add button, configure it according to your JDK and Documentation installation, then click OK. This is completed in the second step. Figure:

4, console Hello World

You can first become familiar with this IDE, then try to write a Hello World program, new project, add Java files and Visula Studio, Delphi is similar, I believe this can't help you, the final effect is this look:

转载请注明原文地址:https://www.9cbs.com/read-39670.html

New Post(0)