JAVA learning-JAVA environment preparation, java-java Environment

Source: Internet
Author: User

JAVA learning-JAVA environment preparation, java-java Environment

Dir: list files and folders in the current directory
Md: create a directory
Rd: delete a directory
Cd: Enter the specified directory and open the folder
Cd ..: Return to the upper-level directory
Cd/or cd \: Return to the root directory
Del: delete an object
D: switch to the root directory of drive d.
Exit: Close the command line interface

JRE and JDK:
JRE is a java running environment. Only java programs can be run after this is installed in the computer.
JDK is a java development tool that can be used for java development. JDK contains JRE.
(: Www.oracle.com or java.sun.com)

Environment variable configuration: java Development Environment programs are all in the installed directory. If you open them in other directories, you need to configure the path installed in java to the environment variables of Windows. In this way, Windows will help you find the java development tool in any directory.

Environment variable setting location (in Windows 7): Right-click computer Properties> advanced system Settings> advanced> environment variable> Path
Environment variable setting method: copy the program Path to the top of the Path, followed by an English one.

Summary: The preparation for the java development environment is divided into: Download JDK, install JDK, and configure environment variables for the tool in bin under the installation directory.

Environment variable configuration tips:
To prevent frequent changes to the directory and Path Name of the bin, and cause frequent changes to the Path content, resulting in Insecure Path content, we create a new system variable JAVA_HOME, make changes easier and more convenient. This is because you only need to change JAVA_HOME later. The principle is as follows:
JAVA_HOME = D: \ jdk1.8.0 _ 74, and D: \ jdk1.8.0 _ 74 can be changed at any time, because I have ensured that the bin is always under JAVA_HOME, and how can I change the content of JAVA_HOME. In the Path, you only need to configure this line with "path = % JAVA_HOME % \ bin.

Temporary environment variables:
Sometimes, you can use a temporary method to configure environment variables by borrowing others' computers or doing some work on others' computers without changing others' environments.
Set: the command used to temporarily configure local environment variables (set path is to view the content of path ). The settings made by the set command are only valid in the current DOS window.
Usage: enter set path = D: \ jdk1.8.0 _ 74 \ bin to configure it temporarily. This configuration does not exist when someone opens the doscommand window again.
If you want to use the existing path of the local machine at the same time, you can configure: set path = D: \ jdk1.8.0 _ 74 \ bin; in this way, you can use the original path variable of the local machine while adding a variable temporarily.
Exception: if you use the "start" command to open a new DOS window in the DOS window you configured, the new window will follow the environment variables you configured.

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.