ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Rotick <pc.gree...@gmail.com>
Subject Re: Creation of an executable jar problem
Date Tue, 01 Feb 2005 18:25:27 GMT
I've created the manifest in three ways and the results are always the
same. I've tried creating it by hand, via the nested element within
jar and via the separate manifest task.

My feeling is that there can be nothing wrong with the manifest since,
when the jar is recreated via the command line with the extracted
contents from the ant created jar, it works. Nothing was changed.

In effect all I did was :-

jar xf old.jar
jar cmf META-INF/MANIFEST.MF new.jar *.jar

The above doesn't actually work because of the other contents of the
directory but it shows the principle.


On Tue, 01 Feb 2005 12:44:48 -0500, Eric Giguere
<eric.giguere@videotron.ca> wrote:
> Do you have your Main-Class entry in the manifest?
> 
> HTH.
> Eric.
> 
> Eric Rotick wrote:
> 
> >I've created an executable jar. When I run it with
> >
> >java -jar myjar.jar
> >
> >I get the NoClassDefFoundError: error.
> >
> >I've looked in the list archives and there are several posts about ant
> >not creating an executable jar correctly but none of these come to any
> >real conclusion as to why.
> >
> >I've extracted the jar and everything looks OK. I then created a new
> >jar from the command line with the extracted contents and this works.
> >
> >One other thing is that the sizes of the two jars are different. If a do a
> >
> >jar tvf
> >
> >on each of them, the contents are exactly the same size.
> >
> >I'm not creating a jarindex on either of them and I make sure that
> >both are compressed or both are not. When compressed the difference is
> >about 100 bytes and when not compressed the difference is 8 bytes.
> >
> >Any ideas.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message