Tag Archives: classpath

How to set up the classpath in jar manifest

You must break after exactly 70 characters. Otherwise the next line is not going to be treated as a continuation from the previous. There should be a leading space in all the wrapped lines, with a leading space for every line different from that with “Class-path:”. And don’t forget a new line at the end of everything! Here is an example of the manifest.

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 .