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

When I try to execute the command.mvnw spring-boot:runit showsThe JAVA_HOME environment variable is n

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744344550a4569602.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信