I'm selecting the correct class with "Main" but Jar will not execute
Answered
I cannot get the executable jar I've created to execute and I know that I've compiled with the correct class with "main". To find the issue, when trying to execute the jar from the command line it says it could not load the main class, which is ResearchApp.java. Pictured below, I believe this looks right but you are the experts. I do a Build > Build Artifacts > Build (and also tried Rebuild)... but when I attempt to run the Jar from ../out/Artifacts/ResearchDB/ the jar, it will not run because it cannot find the main?

Please sign in to leave a comment.
https://youtrack.jetbrains.com/issue/IDEA-116209#focus=streamItem-27-656589-0-0 could be the case. See what's inside the generated jar manifest and if it contains the correct main class.
Another possible cases:
https://stackoverflow.com/a/45169655/104891
https://stackoverflow.com/a/42660624/104891
https://stackoverflow.com/a/42200519/104891
Hi Serge! Thanks for the quick response.
I went through all 4 post links and with no success.If I try to run the jar at the command line, it tells me it cannot find the main class. The Intellij generated manifest looks correct but I posted an image because I'm not that familiar with Java or Intellij to know otherwise.
The last image I attempt to see if I could edit the manifest and played with the path, but when I attempt to create the path as it was before it generated this "intention" comment "Exclude 'researchApp.ResearchApp' from completion". Would this be telling us anything that may be impacting this?
You need to share the jar to get help. Are you sure it doesn't contain any digital signatures from the dependent jars?
Please upload it here: https://intellij-support.jetbrains.com/hc/articles/206869619.
Yes. I did a file search for those extensions (*.RSA and *.SF) in the project. I will upload the jar.
Thanks!
BTW, you are running it incorrectly, it should be:
java -jar researchapp.jar
Uploaded here:
https://youtrack.jetbrains.com/issue/IDEA-206772
Thanks!