I have a springboot application, it runs just fine in intellij. I'm trying to create an executable jar to run the application on other machines. I followed this
tutorialhttps://www.jetbrains.com/idea/guide/tutorials/hello-world/packaging-the-application/
down to every step, and managed to build my jar. but when i try to run the jar with
java -jar nameofjar.java
I get a Could not find or load main class error. I unzipped the jar file with java c and the classpath correctly points to the main class, so im really lost as to what i have to fix here to get java to detect the main class.
I've tried a bunch of solutions from here:
Error: Could not find or load main class in intelliJ IDE
such as deleting .idea or Rebuild Project or doing mvn clean package but nothing seems to work.
Using java -c to open the jar file and verify that the main classpath is indeed correct
Main class and file structure:
This run config works perfectly fine in intellij
here is my manifest.mf:
Manifest-Version: 1.0
Main-Class: com.owl.PosApi.OwlPosApiApplication