设置临时环境变量 避免多次重复设置或着修改系统环境变量

来源:互联网 发布:java达内和黑马哪个好 编辑:程序博客网 时间:2024/05/17 01:48

1. 避免多次重复设置或着修改系统环境变量。

@echo off

set JAVA_HOME=C:\Users\Desktop\JRE1.6.0.30
set M2_HOME=C:\Users\............

@rem %M2_HOME%\ to run any bat you want use JAVA_HOME=C:\Users\Desktop\JRE1.6.0.30.


2.设置当前用户环境变量。

Search "env" in sys Search. find out Environment Variables dialog.

Cope all the path value in System variables and create a new path in User variables then past the cope value. Then you can do what ever you want in User's path.



原创粉丝点击