Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
756 views
in Technique[技术] by (71.8m points)

path - Environment variable is too large on Windows 10

I have recently upgraded to Windows 10 from Windows 8.1.

Now I wanted to set an environment variable for my new installation of Apache Maven.

Each time I created the user variable, things were fine. However, I also need to create the system variable where I will need to append the bin directory to the variable that I already create in the user variable to be "path".

Now, each time I do this, I get an error that says "This environment variable is too large". As a result of this, I am unable to create the path.

I have attached an image of this error.

Enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

When the PATH environment variable gets overloaded with too many values it reaches a point where you cannot add values any more. Trying the following should solve your problem.

Solution 1:

  1. Create a new system environment variable, say 'NEWPATH'
  2. Assign the bin directory location to 'NEWPATH'
  3. Now append '; %NEWPATH%' to the PATH environment variable

If this still doesn't work then try to copy some part of the PATH environment variable already existing values to the 'NEWPATH' and then append the 'NEWPATH'.

Solution 2:

Check the value of the PATH environment variable if you can group and shorten the paths. For example,

C:Program FilesMicrosoft SQL Server102ToolsBinn;C:Program FilesMicrosoft SQL Server102DTSBin;

can be combined to

C:Program FilesMicrosoft SQL Server;

In this way, you can build more space into your fixed length PATH variable and finally adjust your bin directory location into PATH.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...