Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

指定mvn版本后,执行mvn报错 #2

Open
mapleafly opened this issue Jun 26, 2024 · 1 comment
Open

指定mvn版本后,执行mvn报错 #2

mapleafly opened this issue Jun 26, 2024 · 1 comment

Comments

@mapleafly
Copy link

执行mvn -version 报错如下:
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.

win11操作系统。我的vfox从0.3一路升到的0.51。这次打算java maven gradle python nodejs统一使用vfox管理。于是先删除了所有插件,修改sdkPath: D:\version-fox。 重装插件,重装sdk。大概是这个过程。
安装完java后,环境变量为:
JAVA_HOME: D:\version-fox\java\current
VERSION_FOX_PATH: D:\version-fox\java\current\bin
path : D:\version-fox\java\current\bin

在cmd和powershell中一切正常。
继续安装maven,最后,执行 vfox use maven@3.8.6提示成功。 在powershell中执行 mvn -version 提示以上的报错。
查看环境变量,没有任何和mvn相关的环境变量生成。
.tool-versions文件中也没有生成mvn相关的内容。

求指教这是什么原因造成的。

另外,gradle也是这个问题,大概需要java支持的都有这个问题?
nodejs没有这个问题

@aooohan
Copy link
Member

aooohan commented Jul 1, 2024

你打印PATH能看到JAVA_HOME吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants