BUG #6105: Failed to load Main-Class manifest attribute

Lists: pgsql-bugs
From: "Jon C(dot)" <camilleri(dot)jon(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6105: Failed to load Main-Class manifest attribute
Date: 2011-07-10 13:53:06
Message-ID: 201107101353.p6ADr6xg076117@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 6105
Logged by: Jon C.
Email address: camilleri(dot)jon(at)gmail(dot)com
PostgreSQL version: 9
Operating system: WinXP SP3
Description: Failed to load Main-Class manifest attribute
Details:

The following is displayed on the command line when I try to load the jar
files within C:\Program Files\PostgreSQL\pgJDBC:

java -jar postgresql-8.4-702.jdbc3.jar
Failed to load Main-Class manifest attribute from
postgresql-8.4-702.jdbc3.jar

java -jar postgresql-8.4-702.jdbc4.jar
Failed to load Main-Class manifest attribute from
postgresql-8.4-702.jdbc4.jar


From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: "Jon C(dot)" <camilleri(dot)jon(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6105: Failed to load Main-Class manifest attribute
Date: 2011-07-11 07:35:19
Message-ID: 4E1AA7B7.1080704@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On 10/07/11 21:53, Jon C. wrote:

> java -jar postgresql-8.4-702.jdbc3.jar
> Failed to load Main-Class manifest attribute from
> postgresql-8.4-702.jdbc3.jar

What do you expect to happen? It's a JDBC driver, not a standalone
program. You can't run it with "java -jar". It goes on the classpath so
that Java programs can use it to connect to PostgreSQL.

How to add it to the classpath depends on the Java software you are
using. Check the manual for the software package you are attempting to
use. The PgJDBC manual gives generic instructions for Java programmers.

--
Craig Ringer