Pamuleti Pullagura
Pamuleti Pullagura

Reputation: 204

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?

Upvotes: 3

Views: 1199

Answers (4)

Ojonugwa Jude Ochalifu
Ojonugwa Jude Ochalifu

Reputation: 27237

System variable=all users, User Variable = user whose account was used to set it up.

Upvotes: 2

Ankur Singhal
Ankur Singhal

Reputation: 26067

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.

Upvotes: 1

Jens
Jens

Reputation: 69440

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.

Upvotes: 2

Mureinik
Mureinik

Reputation: 311228

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.

Upvotes: 4

Related Questions