• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

manifest issue

 
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi pals,

I'm trying to put some needed lib in the classpath in the manifest jar file like this :
Class-Path: name1.jar name2.jar name3.jar...etc these jars are outside the main jar.

then this error occurs :

any recommendations ?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post the complete manifest file.
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here it is :

[RP] I removed the following libraries from the Class-Path line to make sure the layout isn't messed up too much:
C:\Documents and Settings\559941\Desktop\ncbv2\lib\poi-scratchpad-3.1-FINAL-20080629.jar
C:\Documents and Settings\559941\Desktop\ncbv2\lib\msutil.jar
C:\Documents and Settings\559941\Desktop\ncbv2\lib\poi-3.1-FINAL-20080629.jar
C:\Documents and Settings\559941\Desktop\ncbv2\lib\msbase.jar
C:\Documents and Settings\559941\Desktop\ncbv2\lib\junit-3.8.1.jar
C:\Documents and Settings\559941\Desktop\ncbv2\lib\poi-contrib-3.1-FINAL-20080629.jar
C:\Documents and Settings\559941\Desktop\ncbv2\lib\mssqlserver.jar

All in all, including trailing spaces, the line contained 687 characters.[/RP]
[ August 13, 2008: Message edited by: Rob Prime ]
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Class-Path line is much too long. Lines should not contain more than 70 characters (at least that's how long my Apache Ant makes them).
For instance, this is a line from one of my (automatically generated) manifest files:

It cuts the line of at exactly 70 characters, and continues on the next line with an indentation of 1 space.
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ohh , i got it ok i will cut them then check
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paths that contain spaces will not work, since space characters are seen as delimiters. Also, don't use absolute paths; make them relative to the jar file that contains the manifest.
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rob Prime:
The Class-Path line is much too long. Lines should not contain more than 70 characters (at least that's how long my Apache Ant makes them).
For instance, this is a line from one of my (automatically generated) manifest files:

It cuts the line of at exactly 70 characters, and continues on the next line with an indentation of 1 space.




i cut them but still this error occurs :



here is the new manifest :


 
Rob Spoor
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) There's no leading space in all the wrapped lines
2) You must break after exactly 70 characters. Otherwise the next line is not going to be treated as a continuation from the previous
3) Read Ulf's comments
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rob Prime:
1) There's no leading space in all the wrapped lines
2) You must break after exactly 70 characters. Otherwise the next line is not going to be treated as a continuation from the previous
3) Read Ulf's comments


Thanks for your reply i found a link on internet will take away this headache in future here it is Sealing your jar
i will try it and see the results
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf/Rob,

Thanks a lot for the info on the manifest classpath structure. Was driving me mental! But did exactly what you said and it worked like a charm!

Thanks once again

Arwinder
 
Rob Spoor
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome, and welcome to the Ranch!
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear all,

how exactly i cut the lines in my manifest? starts after the class-path or from the very first character?

example :
Manifest-Version: 1.0 Class-Path: lib2/acegi-security-1.0.7.jar lib2/b
ackport-util-concurrent.jar lib2/commons-codec.jar lib2/commons-dbcp.j
ar lib2/commons-logging-1.1.jar lib2/commons-pool-1.4.jar lib2/ehcache
-1.5.0.jar lib2/ibatis-2.3.4.726.jar lib2/log4j-1.3alpha-8.jar lib2/my
sql-connector-java-5.1.6-bin.jar lib2/persistence.jar lib2/spring.jar
lib2/spring-aop.jar lib2/spring-beans.jar lib2/spring-context.jar lib2
/spring-context-support.jar lib2/spring-core.jar lib2/spring-jdbc.jar
lib2/spring-orm.jar lib2/spring-test.jar lib2/spring-tx.jar lib2/topli
nk-essentials.jar Main-Class: com.ale.bravo.pmr.Bootstrap Created-By:
1.6.0_25 (Sun Microsystems Inc.)

well, i'd try cutting 70 chars with both technique, but the output is "invalid or corrupt manifest"
could you give me some examples?

thanks,

 
Arya Bima Setyantoro
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why isn't it working?



the output is "invalid header"?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It must be exactly 70 character each line, 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!

This works for me in a Spring application:


 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch Bartholomew Mancuso
 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic