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?

 

0
6 comments
Avatar
Permanently deleted user

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?

 

0

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.

0
Avatar
Permanently deleted user

Yes. I did a file search for those extensions (*.RSA and *.SF) in the project. I will upload the jar.

Thanks!

0

BTW, you are running it incorrectly, it should be:

java -jar researchapp.jar

0
Avatar
Permanently deleted user
0

Please sign in to leave a comment.