I have created a Dropwizard application using Intellij.
(Here com.indore.GalaxyApp
is name of my MainClass)
This is the pom.xml of my application.
After building the project using mvn clean package
, in my target
directory a jar
file is created.
Now, I am trying to run the application with the jar file through terminal, I get the following response :
In order to make the jar
executable
I have configured the Maven Archiver and added the following plugin in
pom.xml
acc to this SO answerI even run the application by:
java -cp target/galaxy-1.0-SNAPSHOT.jar com.indore.GalaxyApp
but still getting the same error.
I have referred to these post :
setup-main-class-in-manifest, Cant execute jar file
Can anyone tell me a way to fix this issue??