• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 763
  • Last Modified:

Problem with manifest / XP

I have an ant build script that builds jar files (among other things) and it works fine on Linux and W2K, but when I try to run it from a XP machine, it says:

[jar] Manifest is invalid: Manifest sections should start with a "Name" attribute and not "Class-Path"

I'm running the same versions on all machines, java 1.3.1 and ant 1.4.1.

Does the ant task work differently on XP?
0
khbh
Asked:
khbh
  • 4
  • 3
  • 2
  • +2
2 Solutions
 
objectsCommented:
Very strange.
Try changing the end of line seperator used in your manfiest file.
0
 
Tommy BraasCommented:
Could you post a copy of the manifest?
0
 
khbhAuthor Commented:
OK, after further investigation I've noticed that a $-sign has mysteriously disappeared before the Class-Path statement in the build.xml file. Hmm, the file is still checked in in ClearCase and the XP computer has a view created through the ClearCase's web interface, the other machines has not. The build.xml file contains other $-signs that seems to work but they aren't inside an echo statement. Anyhow, I will add the $-sign and hopefully this will solve the problem. I'll let you know. Thanks anyway for your comments.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
khbhAuthor Commented:
OK (again), after another investigation there should be no $-sign before the Class-Path statement, so I think we're back to square one. Then it seems like it's the ant task behaves differently on the platforms. On linux/W2K it adds

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.4.1
Created-By: 1.3.1_07-b02 (Sun Microsystems Inc.)

to my created manifest (in the beginning of the file) when jarring it. Therefore it works.

I've seen that one can use the manifest statement in ant. I will try that out.

Thanks once more.
0
 
objectsCommented:
So you don't currently supply a manifest? Is that correct.

if so what does the manifest generated by xp look like?


0
 
khbhAuthor Commented:
I supply this manifest file (created by echo statements since we're running 1.4.1 and can't use the manifest statement) to the jar ant task:

Main-Class: my.testclass.Main

Class-Path: . jars\ichannel.jar jars\jsse.jar jars\jakarta-regexp-1.2.jar jars\log4j.jar jars\koala.jar jars\conc.jar jars\jcert.jar jars\jaxp.jar jars\jnet.jar jars\xerces.jar jars\myapp.jar file:///c:\orbacus\lib\OB.jar file:///c:\orbacus\lib\OBBalancer.jar file:///c:\orbacus\lib\OBBiDir.jar file:///c:\orbacus\lib\OBEvent.jar file:///c:\orbacus\lib\OBIMR.jar file:///c:\orbacus\lib\OBNaming.jar file:///c:\orbacus\lib\OBProperty.jar file:///c:\orbacus\lib\OBTest.jar file:///c:\orbacus\lib\OBTime.jar file:///c:\orbacus\lib\OBUDP.jar file:///c:\orbacus\lib\OBUtil.jar file:///c:\orbacus\lib\OBWatson.jar

and on linux/W2K the manifest file in the created jar file has the following lines added at the top:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.4.1
Created-By: 1.3.1_07-b02 (Sun Microsystems Inc.)

This is not the case with XP. The jar task complains about the supplied manifest file so it seems like it doesn't add the lines above.

I've also tested with ant 1.5.2.
0
 
objectsCommented:
Did u try changing the eol character used as I suggested above?
0
 
CleanupPingCommented:
khbh:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
khbhAuthor Commented:
Yes, it didn't change anything :(
0
 
Tommy BraasCommented:
I noticed that there's an awful lot of colons in the paths above. Might I suggest replacing path separating colons with semicolons, and "file:///c:" with "file:///c|" and all backslashes with forward slashes.

I hope this helps!

orangehead
0
 
TimYatesCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between objects and orangehead911.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TimYates
EE Cleanup Volunteer
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now