Comment configurer le chemin de classe dans le manifeste jar

Vous devez rompre après exactement 70 caractères. Sinon, la ligne suivante ne sera pas traitée comme une continuation de la précédente. Il devrait y avoir un espace de tête dans toutes les lignes enveloppées, avec un espace de début pour chaque ligne différente de celle avec “Class-path:”. Et n’oubliez pas une nouvelle ligne à la fin de tout ! Voici un exemple du manifeste.

Manifest-Version: 1.0
Main-Class: xyz.HelloWorldMain
Class-Path: ./lib/log4j-1.2.15.jar ./lib/commons-logging-1.1.1.jar ./l
 ib/jstl-1.2.jar ./lib/jstl.jar ./lib/log4j-1.2.15.jar ./lib/org.sprin
 gframework.aop-3.0.2.RELEASE.jar ./lib/org.springframework.asm-3.0.2.
 RELEASE.jar ./lib/org.springframework.aspects-3.0.2.RELEASE.jar ./lib
 /org.springframework.beans-3.0.2.RELEASE.jar ./lib/org.springframewor
 k.context-3.0.2.RELEASE.jar ./lib/org.springframework.context.support
 -3.0.2.RELEASE.jar ./lib/org.springframework.core-3.0.2.RELEASE.jar .
 /lib/org.springframework.expression-3.0.2.RELEASE.jar ./lib/org.sprin
 gframework.instrument-3.0.2.RELEASE.jar ./lib/org.springframework.ins
 trument.tomcat-3.0.2.RELEASE.jar ./lib/org.springframework.jdbc-3.0.2
 .RELEASE.jar ./lib/org.springframework.jms-3.0.2.RELEASE.jar ./lib/or
 g.springframework.orm-3.0.2.RELEASE.jar ./lib/org.springframework.oxm
 -3.0.2.RELEASE.jar ./lib/org.springframework.test-3.0.2.RELEASE.jar .
 /lib/org.springframework.transaction-3.0.2.RELEASE.jar ./lib/org.spri
 ngframework.web-3.0.2.RELEASE.jar ./lib/org.springframework.web.portl
 et-3.0.2.RELEASE.jar ./lib/org.springframework.web.servlet-3.0.2.RELE
 ASE.jar ./lib/org.springframework.web.struts-3.0.2.RELEASE.jar .

Laisser une réponse

Découvrez-en davantage sur le blog de Velislav Krastev

Abonnez-vous maintenant pour continuer à lire et accéder aux archives complètes.

Continuer la lecture