-2

I have created a jar file of a SpringBoot application using gradle.However when I try to run the jar file I am getting the following error: screenshot of error message

Here is a SS of the entire project structure along with the build.gradle file content

Screenshot 2

Cant seem to figure out the problem. Getting this error whenever I run the jar file. I created the jar file using "gradle build" command

SIM777
  • 13
  • 4
  • I used the full package name : "com.example.websocketdemo.WebsocketDemoApplication" But it is still showing same error – SIM777 Jan 28 '23 at 15:47
  • Try to run `java -jar .jar` from the command line to see if it works. If it works, please share a screenshot of your IDEA's run configuration (IDE main menu `Run | Edit Configurations`). – floating cat Jan 29 '23 at 02:53

1 Answers1

0

you should use full package name com.example.mywebsocketdemo. in build.gradle

Sergey
  • 933
  • 2
  • 19
  • 48
  • I used the full package name : "com.example.websocketdemo.WebsocketDemoApplication" But it is still showing same error – SIM777 Jan 28 '23 at 15:49