environment variable is too large 2047

https://stackoverflow.com/questions/34491244/environment-variable-is-too-large-on-windows-10

方案1

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.

Solution 1:

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

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'

Solution 2:

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\;

can be combined to

C:\Program Files\Microsoft 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.

Hope this helps you!

 

方案2

There are few ways to clean up your path variable. The easiest is to use Rapid Environment Editor. This free utility will,

  1. Remove the duplicate paths (right click > Cleanup Paths)
  2. Remove non-existent folders (shown in red which you need to manually delete)
  3. Replace long paths with short paths (right click > long to short path).

I do above steps in order and use 3rd step only for longest paths until Path variable size is in control again.

If you want to go more advanced, here's little C# tool that you can modify to whatever other logic you want to implement

转载于:https://www.cnblogs.com/chucklu/p/10485014.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
如果出现报错信息"The CATALINA_HOME environment variable is not defined correctly",可以按照以下步骤来处理: 1. 点击"我的电脑",然后选择"此电脑",右键点击属性。 2. 在属性窗口中,确认是否正确设置了CATALINA_HOME环境变量。CATALINA_HOME环境变量指定了Tomcat的安装目录。 3. 如果CATALINA_HOME环境变量没有正确设置,可以手动设置该变量的值为Tomcat的安装目录。 4. 设置完毕后,重新运行Tomcat,检查是否解决了问题。 引用来源于解决CATALINA_HOME环境变量问题的步骤。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [] Tomcat环境变量配置报错闪退:The CATALINA_HOME (JRE_HOME) environment variable is not defined ...](https://blog.csdn.net/qq_53130059/article/details/129715328)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [tomcat-5.5.23](https://download.csdn.net/download/u011758634/6019309)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值