Обсуждение: .jar file gives error

Поиск
Список
Период
Сортировка

.jar file gives error

От
Rob Richardson
Дата:

Greetings!

 

This is probably a simple question because I have never before tried to run a .jar file.

 

I just downloaded the latest PostgreSQL JDBC installation file.  When I tried to run it using the “java –jar” command, I got the following error:

 

Failed to load Main-Class manifest attribute from

postgresql-9.2-1002.jdbc4.jar

 

What do I need to do to fix this?

 

Thank you very much.

 

RobR

Re: .jar file gives error

От
andreak@officenet.no
Дата:
<div>På onsdag 14. november 2012 kl. 15:16:09, skrev Rob Richardson <<a href="mailto:RDRichardson@rad-con.com"
target="_blank">RDRichardson@rad-con.com</a>>:</div><blockquotestyle="border-left: 1px solid rgb(204, 204, 204);
margin:0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="WordSection1"><p class="MsoNormal">Greetings!<p
class="MsoNormal"> <pclass="MsoNormal">This is probably a simple question because I have never before tried to run a
.jarfile.<p class="MsoNormal"> <p class="MsoNormal">I just downloaded the latest PostgreSQL JDBC installation file. 
WhenI tried to run it using the “java –jar” command, I got the following error:<p class="MsoNormal"> <p
class="MsoNormal">Failedto load Main-Class manifest attribute from<p class="MsoNormal">postgresql-9.2-1002.jdbc4.jar<p
class="MsoNormal"> <pclass="MsoNormal">What do I need to do to fix this?</div></blockquote><div>What are you trying to
accomplish?PgJDBC is not an application, it is a database-driver implementing the JDBC-specification, providing a way
forJAVA-programmers to communicate with PG from JAVA.</div><div> </div><div class="origo-email-signature">--<br />
AndreasJoseph Krogh <andreak@officenet.no>      mob: +47 909 56 963<br /> Senior Software Developer / CTO -
OfficeNetAS - http://www.officenet.no<br /> Public key:
http://home.officenet.no/~andreak/public_key.asc</div><div> </div>

Re: .jar file gives error

От
"David Johnston"
Дата:

The JDBC JAR is not something you can run standalone.  You have to make sure the JAR is available in the classpath when you are running another application that needs to use the PostgreSQL JDBC Implementation.

 

I don’t have the correct syntax or answer for you at the moment but you should be able to find something via Google search pretty readily.

 

David J.

 

From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Rob Richardson
Sent: Wednesday, November 14, 2012 9:16 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] .jar file gives error

 

Greetings!

 

This is probably a simple question because I have never before tried to run a .jar file.

 

I just downloaded the latest PostgreSQL JDBC installation file.  When I tried to run it using the “java –jar” command, I got the following error:

 

Failed to load Main-Class manifest attribute from

postgresql-9.2-1002.jdbc4.jar

 

What do I need to do to fix this?

 

Thank you very much.

 

RobR