ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Pfeiffer" <wspli...@tampabay.rr.com>
Subject Re: Problem with manifest and executable jar
Date Sat, 15 Feb 2003 22:01:48 GMT
Martin,

Using the java -jar <mymain> showed me that my class was indeed found but
the supporting classes in the support jars were not found.  I did some
research and found that I cannot use the Class-Path to refer to jars within
my jar but should expect them to be present in the same directory as my jar.
I removed the support jars from the jar I am creating and just put them all
in one directory.  I then reran the jar and it worked.

Thanks for the heads up and putting me on the right path.

Bill Pfeiffer
----- Original Message -----
From: "Martin" <mgainty@hotmail.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Thursday, August 22, 2002 1:31 PM
Subject: Re: Problem with manifest and executable jar


> Bill
> What is the exact message
> Are you running it
> java -jar foo.jar?
> -Martin
>
> ----- Original Message -----
> From: "Bill Pfeiffer" <wsplist1@tampabay.rr.com>
> To: "Ant-User" <ant-user@jakarta.apache.org>
> Sent: Saturday, February 15, 2003 4:59 PM
> Subject: Problem with manifest and executable jar
>
>
> I need a second set of eyes to view my manifest generated by Ant.  I'm
> trying
> to build a simple executable jar with only 1 class and a couple of support
> libs.  Should be simple but I can't get it to run.  When I attempt to I
get:
>
> Could not find the main class. Program will exit!
>
> Here's the manifest generated by ant:
> -------------------
> Manifest-Version: 1.0
> Created-By: Apache Ant 1.5.1
> Main-Class: com.bpcs.web.RouterIpSync
> Class-Path: ftp.jar jakarta-oro-2.0.6.jar
> Built-By: wpfeiffe
>
> Name: com/bpcs/web/RouterIpSync.class
> Specification-Title: UpdateWebHome
> Specification-Version: 1.0
> Specification-Vendor: BPCS
> Implementation-Title: UpdateWebHome
> Implementation-Version: 1.0
> Implementation-Vendor: BPCS
>
>
> Table of contents for my jar:
> ----------------------------
> META-INF/
> META-INF/MANIFEST.MF
> com/
> com/bpcs/
> com/bpcs/web/
> com/bpcs/web/RouterIpSync.class
> ftp.jar
> jakarta-oro-2.0.6.jar
>
> Note that I have coded and tested the RouterIpSync class with a main
method
> and it works just fine.
>
> Any ideas??
>
> TIA,
>
> Bill Pfeiffer
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


Mime
View raw message