简体   繁体   中英

What is the difference between setting the path for Java in user variables and system variables?

I'm installing Java on my windows. I'd like to know the difference between setting the path for Java in user variables and setting it in System variables?

System variables are shared between all the users on the machine. User variables are specific to a single user.

Ultimately, they will both have the same effect, and the decision should depend on who needs to use Java on the machine.

If you set the path in user variables the path in only visible for the user. In system variables this path is visible for all users.

系统变量=所有用户,用户变量=用于设置帐户的用户。

Right-click My Computer and go to Properties->Advanced->Environmental Variables ...

What's above are user variables , and below are system variables . The elements are combined when creating the environment for an application. System variables are shared for all users, but user variables are only for your account/profile.

Environment variables are 'evaluated' (ie. they are attributed) in the following order:

System variables
Variables defined in autoexec.bat
User variables

In simple words,

System environment variables are global to all users, while users environment variables are specific only to the currently logged in user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM