Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
etc/profile文件配置maven环境变量
Experiences and Insight
1966
views ·
1
replies ·
To
floor
Go
spq
deepin
2018-04-10 06:09
Author
我自己在maven官网上下载了3.5.3版本,归档在/home/用户下/dev/apache-maven-3.5.3文件下
然后,我切换了root账户得到权限,更改了profile文件
export
M2_HOME=
$HOME
/dev/
apache-maven-3.5.3
export
MAVEN_OPTS=
"-Xms128m -Xmx1024m"
export
PATH=
$M2_HOME
/bin:
$PATH
写入profile文件保存退出,
执行了source /etc/profile
尝试测试mvn -v命令时,确提示了无效命令
百科了网上质料,说是重新启动电脑,但是,我的电脑重启之后提示,profile文件下新增的maven环境三行,错误。
Reply
Like 0
Favorite
View the author
All Replies
spq
deepin
2018-04-10 06:14
#1
自己犯傻了(maven源代码,安装在home/用户下,使用了root用户去执行mvn -v命令),成功配置了。
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
How to fix grub boot menu that has disappeared?
Looking Deepin ci 25.2.0 Developer/Unstable repositories
Popular Events
More
然后,我切换了root账户得到权限,更改了profile文件
export M2_HOME=$HOME/dev/apache-maven-3.5.3
export MAVEN_OPTS="-Xms128m -Xmx1024m"export PATH=$M2_HOME/bin:$PATH写入profile文件保存退出,
执行了source /etc/profile
尝试测试mvn -v命令时,确提示了无效命令
百科了网上质料,说是重新启动电脑,但是,我的电脑重启之后提示,profile文件下新增的maven环境三行,错误。