3

I'm attempting to create a jar for an RSA-based encryption program that I'm working on. The program itself is completely functional, and runs perfectly by running my main class, aptly named Main. However, when I attempt to use IntelliJ artifacts to create a jar for my project, MANIFEST.MF claims to be unable to resolve the Main class. Here's the entire contents of MANIFEST.MF (with a newline at the end of the file):

Manifest-Version: 1.0
Main-Class: Main

Both Manifest-Version and Main-Class are blue-bolded (not sure if that's the correct term for it; it's the same effect IntelliJ gives to words like import, public, and static), but Main has a red text color, and hovering over it results in "Cannot resolve class: 'Main'".

MANIFEST.MF is located in src/META-INF. I've tried putting it in either src/main/resources/META-INF or src/main/java/META-INF, but neither of those work, resulting in "no main manifest attribute" when I attempt to run the resulting jar from command line. Does anyone know possible steps I could take to resolve this?

Elie Hess
  • 41
  • 4

0 Answers0