Search code examples
javamavengradlecommand-line-interfacemicronaut

Default micronaut application not running


Not being able to execute the default micronaut application using basic cli commands. This problem has occured on both the Maven and Gradle default projects. I don't understand why I'm having issues running the app.

The repective default project base directories contain the mvnw and gradlew files so I don't think it's a problem with maven/gradle being out of date on my computer or anything along those lines.

I've checked the class path being passed into the arguments in both the gradlew and mvnw bat and cmd files. Their respective wrapper.jar paths are being passed in as classpath arguments.

Here's some images.

Maven error message, similar error occurs when trying to run with gradle:

Base directory of maven project:

Gradle error message:

Base directory of gradle project:

Parent directory image:

UPDATE: I just tried downloading someone else's project directory from a guide on micronauts website I unzipped it and used the ./gradlew run command, the server seems to be up and running. The zip comes with initial and completed subdirectories each with their own micronaut application inside, they run too using the same gradle command.

This leads me to believe that there was something wrong with my micronaut installation. Maybe it's shipping a faulty default application (that's not configured properly)?


Solution

  • I created a new micronaut application in my C drive with a different directory, it worked. I think it has something to do with the original path variable having too many spaces and - in it. Making the classpath (in the gradlew.bat) unreachable essentially.