本文介绍了如何在 Windows 10 中将文件夹添加到“Path"环境变量(附截图)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 StackOverflow 和一般网络上,关于如何将特定文件夹添加到用户的 Windows 10 Path 环境变量的指南已过时且很少.

我认为为新开发人员提供的完整指南以及分步说明和屏幕截图对于帮助他们从

第 2 步 - 点击 Settings 图标

第三步 - 点击系统

第四步 - 点击About

第五步 - 点击系统信息

第 6 步 - 点击高级系统设置

第 7 步 - 点击环境变量...

第 8 步 - 选择 Path 行,然后点击 Edit

第 9 步 - 点击 New,然后点击 Browse,然后在下一个打开的面板中,您需要选择所需的文件夹在 路径 中.对于本指南的初始前提,我将添加文件夹 C:UsersNewFolderInPath

第 10 步 - 单击 OK 并单击您将遇到的每个 OK 按钮以关闭之前的所有窗口.

第 11 步 - 打开 命令提示符 (cmd),现在您无需指定完整路径即可执行实用程序.

注意:对于每个问题,请在下方留言,我会尽快回复.祝你好运,编码愉快:)

On StackOverflow and on the net in general, there are outdated and few guides on how to add a specific folder to the Windows 10 Path environment variable of the user.

I think a complete guide for new developers with step by step instructions and screenshots could be really usefull to help them executing utilities from a Command Prompt without the need of the full path, simplifying the things.

解决方案

For the guide below we want to add an example utility called mytool.exe which is located in C:UsersNewFolderInPathmytool.exe, so that everytime i want to execute the mytool utility i don't have to specify the full path.

I used this as an example, you can replace the folder with something more realistic like the JDK bin directory located here C:Program FilesJava{JDK_VERSION}in to execute javac, keytool or everything you want.

NOTE : For every problems leave a comment below and i will answer as soon as i can.Good luck and happy coding :)

这篇关于如何在 Windows 10 中将文件夹添加到“Path"环境变量(附截图)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 03:47