I’m using JDK 1.5 and IntelJ 8.1.4 on window XP, and using Ant to build and generate my .jar pachage. The problem is, the MANIFEST.MF of .jar package file doesn’t have Main-Class and path information. Here is the info of MANIFEST.MF:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 1.5.0_22-b03 (Sun Microsystems Inc.)
Here is the iws file of my project, it does have the main class:
<configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false" sample_coverage="true" runner="emma">
<option name="MAIN_CLASS_NAME" value="cms.client.gui.CMT" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method>
<option name="Make" value="true" />
</method>
</configuration>
Any comments?
If you are using ant you just need to update your jar target: