0.Java Download Installation Configuration

Source: Internet
Author: User

1:java Download: http://java.sun.com/

As if Oracle had acquired Sun, Java developer Sites developers.sun.com and java.sun.com migrated to a completely re-architected and redesigned website:

http://www.oracle.com/technetwork/java/index.html to download the latest on the official website.

2:java installation: After downloading the installation package of the corresponding system, it can be installed until it is complete.

3:java configuration:

Configuration in the 3.1:windows environment

3.1.1: Go to the "Properties" option of "Computer", select "Advanced System Settings", click "Advanced System Settings", select "Environment variable";

3.1.2: "New" under System variable: "Variable name": Java_home "Variable value": C:\Program files\java\jdk1.8.0_31

Note: the "Variable Value" column mainly fills in the path where you install Java, which may vary depending on the individual situation;

3.1.3: Select "Path" in the environment variable, then edit: In the "Variable Value" column, add the following: "%java_home%\bin;%java_home%\jre\bin;"

Note: The above code best one character is not bad, because Java_home has limited the path of your JDK, Java each version of the JDK should be composed of these things;

3.1.4: After the previous step is determined, then "new": "Variable Name": ClassPath "Variable Value":.; %java_home%\bin;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar

Note: The above code is best also a character unchanged paste up, "variable value" the most front.; Don't miss out.

After you finish the above three settings, the configuration of the environment variable is complete.

3.2: Check environment variables:

Bring up the "cmd" Check: Input: "Java";

Input: "Javac";

Input: "Java-version";

View environment Change configuration: Echo%PATH%

****************************************************************************************************

About the meanings of java_home, path, and classpath:

Java_home Environment variables:

It points to the JDK's installation directory, and software such as Eclipse/netbeans/tomcat finds and uses the installed JDK by searching for java_home variables.


PATH environment variable:

You can allow the system to recognize the JAVA,JAVAC command under any path, by specifying a command search path, and when the system executes the command, it will look in the path specified by the path variable to see if the appropriate command program can be found. Add the Bin directory under the JDK installation directory to the existing path variable, the bin directory contains the frequently used executable files such as Javac/java/javadoc, set the path variable, you can execute Javac/java and other tools in any directory;

    
Classpath variables:

The role is to specify the class search path, to use the already written class (import *.class), the premise is to be able to find them, the JVM is through the classpth to find the class. Classpath is to tell the JVM what path to use or execute for the class, so that the JVM loads the class file

.; Represents the current path, Tools.jar and Dt.jar are class library paths. If you don't use the things in swing, you can dt.jar. Tools.jar inside is the most basic tool class, such as Javac, do not add is unable to do development.

Dt.jar and Tools.jar in the configuration classpath of the JDK:

Dt.jar and Tools.jar are the two most basic Java packages that contain the most important lang packets from Java to various advanced functions such as the visual Swing package, which is essential for Java.

Rt.jar is the Java base Class library, Dt.jar is about the runtime environment of the class library, Tools.jar is the tool class library

The web system is used Tool.jar


1. Rt.jar default is in the root ClassLoader loading path inside the Claspath is superfluous don't believe you can remove classpath inside Rt.jar

Then use Java-verbose XXXX to run a simple class to know the JVM system root loader path inside, not only Rt.jar jre/lib below most of the jar is in this path

2. Tools.jar is used by the system to compile a class when used to Javac Javac Xxx.java
is actually running Java-calsspath=%java_home%/lib/tools.jar xx.xxx.Main Xxx.java
Javac is the encapsulation of the above command, so Tools.jar doesn't have to be added to Classpath.

3. Dt.jar is a class library about the operating environment, mainly swing packages. When you want to use swing, it's best to add
Dt.jar seems to be some sort of swing, and the default JRE for the Eclipse development environment does not include it. should be useless.
Tools.jar Application server is used to compile JSP files, the application server will load itself, do not need to set their own.





1. Rt.jar default is in the root ClassLoader loading path inside the Claspath is superfluous do not believe you can remove classpath Rt.jar and then use Java-verbose **x to run a simple class to know the system root of the JVM Loader's path is not only Rt.jar jre/lib most of the jars underneath are in this path.
2. Tools.jar is the system used to compile a class when the use of the javac when used to Javac **.java is actually running Java-calsspath=%java_home%/lib/tools.jar xx.**. Main **.java Javac is the encapsulation of the above command, so Tools.jar does not have to add to the classpath.
3. Dt.jar is a class library about the operating environment, mainly swing packages. When you want to use swing, it's best to add


Dt.jar is a class library about the operating environment, mainly swing packages
Tools.jar is a class library of some tools
Rt.jar contains the base class library of the JDK, which is the class file of all the classes you see in Java doc

Compiling and running are the classes that are required in the Toos.jar, respectively.
sun.tools.java.*;
sun.tools.javac.*;

0.Java Download Installation Configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.