Question
How can I automatically update the Class-Path attribute in the MANIFEST.MF file when I add new libraries to my JAR artifact configuration in IntelliJ IDEA?
Answer
IntelliJ IDEA automatically scans the specified library directory (e.g., lib) and populates the Class-Path attribute in the MANIFEST.MF file only when the JAR artifact is initially created.
If you add new libraries later and need to update the MANIFEST.MF, the IDE does not automatically rescan and update the existing artifact's manifest classpath.
To achieve an automatic update, you need to:
- Delete the existing JAR artifact configuration (
File | Project Structure | Artifacts). - Recreate the JAR artifact configuration. During creation, the IDE will scan the library directory again and include all current libraries in the
MANIFEST.MFClass-Path.
Comments
0 comments
Please sign in to leave a comment.