最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Error "the JAVA_HOME environment variable is not defined correctly" on running ".mvnw spring-boot:run

programmeradmin5浏览0评论

When I try to execute the command

./mvnw spring-boot:run

it shows

The JAVA_HOME environment variable is not defined correctly, this environment variable is needed to run this program.

where can i fix this?

I tried to look at the mvnw and mvnw.cmd files but without success.

When I try to execute the command

./mvnw spring-boot:run

it shows

The JAVA_HOME environment variable is not defined correctly, this environment variable is needed to run this program.

where can i fix this?

I tried to look at the mvnw and mvnw.cmd files but without success.

Share Improve this question asked Mar 21 at 15:04 WillWill 1
Add a comment  | 

1 Answer 1

Reset to default 0

Add the JAVA_HOME enviroment variable, eg if your jdk is at C:\Program Files\Java\jdk-17

JAVA_HOME=C:\Program Files\Java\jdk-17

Type 'environment' in the Windows search bar and select "Edit the system environment variables".

You will have to open a new Windows CMD window for it to take effect.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论