Windows 10上的环境变量太大 [英] Environment Variable is too large on Windows 10

查看:97
本文介绍了Windows 10上的环境变量太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这很奇怪,我花了近三天的时间在线搜索解决方案,但没有找到有用的解决方案.所以我决定来这里.

I know this is strange and I have spent almost 3 days searching for the solution online without getting a useful one. So I have decided to come here.

我最近已从Windows 8.1升级到Windows 10.

I have recently upgraded to Windows 10 from Windows 8.1.

现在,我想为新安装的Apache Maven设置一个Environment变量.

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

每次创建用户变量时,一切都很好.但是,我还需要创建系统变量,在其中我需要将bin目录附加到我在用户变量中由Aready创建的变量中,以作为"path".

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

现在,每次执行此操作时,我都会得到一条错误消息,内容为:此环境变量太大.因此,我无法创建路径.

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

我已附上此错误的图片.

I have attached image of this error.

如果有人可以帮助我解决此问题,我将不胜感激.

I will appreciate this if anyone can assist me to solve this problem.

在此先感谢您的帮助.

Thank you in advance for your assistance.

推荐答案

当PATH变量的值过多时,它就会达到无法再添加值的地步.尝试以下方法应该可以解决您的问题.

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

解决方案1:

  1. 创建一个新的系统变量,例如"NEWPATH"
  2. 将bin目录位置分配给"NEWPATH"
  3. 现在添加""; %NEWPATH%"添加到PATH变量
  1. Create a new system variable say 'NEWPATH'
  2. Assign the bin directory location to 'NEWPATH'
  3. Now append '; %NEWPATH%' to the PATH variable

如果仍然无法解决问题,请尝试将PATH变量中已有的值复制到"NEWPATH"中,然后附加"NEWPATH"

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

解决方案2:

如果可以分组和缩短路径,请检查PATH变量的值.例如,

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

C:\ Program Files \ Microsoft SQL Server \ 102 \ Tools \ Binn \; C:\ Program Files \ Microsoft SQL Server \ 102 \ DTS \ Bin \;

C:\Program Files\Microsoft SQL Server\102\Tools\Binn\;C:\Program Files\Microsoft SQL Server\102\DTS\Bin\;

可以组合为

C:\ Program Files \ Microsoft SQL Server;

C:\Program Files\Microsoft SQL Server;

通过这种方式,您可以在固定长度的PATH变量中增加更多空间,最后将bin目录的位置调整为PATH.

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

希望这对您有所帮助!

这篇关于Windows 10上的环境变量太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆