4

I have developed a Java project in the IntelliJ IDEA. When I build the jar artifact like described HERE, everything goes as it is supposed to. But when I double click the generated jar file in the output folder, I get the message:

Could not find the main class: DoxCalculator.DoxCalculator. Program will exit.

(My project and main class are both called DoxCalculator). When I open the jar file with WINRAR, I notice that only my library files are in there, but no compilation output. Strange, because according to the project structure window at the artifacts item, It should be included.

My MANIFEST.MF looks like this:

Manifest-Version: 1.0
Main-Class: DoxCalculator.DoxCalculator

I have searched a lot of questions on the forum, but there seem to be no similar problems asked.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Sander
  • 591
  • 6
  • 16
  • Can you provide a sample IDEA project to reproduce this problem? – CrazyCoder Aug 31 '12 at 13:10
  • You are saying that your project name and main class name are both called `DoxCalculator` what exactly do you mean? An IntelliJ IDEA project has nothing to do with the package name. So `DoxCalculator.DoxCalculator` suggests that your package name is `DoxCalculator` and that the class name is `DoxCalculator`. Is that really correct? – maba Aug 31 '12 at 13:48

0 Answers0