Modify the system environment variable cmd command

Source: Internet
Author: User

We have some simple understanding of the use of CMD, but the main problem that bothers us is:

The cmd command modifies the environment variable in two ways: 1, effective in the short term, and automatically expires after the DOS window is closed

2, long-term effective, close the DOS window is still valid

Here is a detailed description:

First (short-term effective)

Set environment variable NAME = environment variable Value

is to use the SET command to set Java_home environment variables (divided into direct assignment and append assignment) The second: long-term effective to find Cmd.exe files (usually under C:\Windows\system32\), as an administrator to open the cmd file setx/m environment variable name " Environment variable Value "is the modified Java_home value please leave a message if you have any questions.

Modify the system environment variable cmd command

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.