Java Spring Boot API Gold medal metrics Maven issue

I’m having an issue with:
https://www.codecademy.com/paths/create-rest-apis-with-spring-and-java/tracks/spring-apis-data-with-jpa/modules/spring-gold-medal-metrics/informationals/spring-gold-medal-metrics

I’m unable to execute the mvnw spring-boot:run command in the intellij terminal. The error I get is:

mvnw : The term ‘mvnw’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • mvnw spring-boot:run
  •   + CategoryInfo          : ObjectNotFound: (mvnw:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

I’ve reloaded the project in the IDE and it changes nothing. Any ideas on how to fix this?

1 Like

Are you on Windows? Use the ./mvnw spring-boot:run version of the command. The lesson says to do it without the ./ for windows, but you need it if you are using powershell (the default in intelliJ). Maybe without the ./ is for command prompt?

Funnily enough, I was able to get it to run by using backslash rather than forward slash.
.\mvnw spring-boot:run
I think restarting my PC might have also had something to do with it. Thanks for the help @davejandrea

1 Like

Hello,
I have Java version 17.0.1 and I am getting the following message when trying to use the ./mvnw spring-boot:run command:

permission denied: ./mvnw

is there a way to update the spring-boot to work with the java 17 version?