Thread: installing postgresql jdbc driver in Mac OS X Lion
I'm trying to install the jdbc driver on my Mac OS X Lion installation. I'm running JRE 1.6.0_26. I've downloaded postgresql-9.0-801.jdbc4.jar and run java -jar postgresql-9.0-801.jdbc4.jar which returns Failed to load Main-Class manifest attribute from postgresql-9.0-801.jdbc4.jar Any help trying to resolve this issue would be appreciated! Thanks, Shaun -------------------------- Shaun Langley Graduate Student, PhD Department of Geography Michigan State University Home: (517) 974-9346
On 28 June 2011 03:22, Shaun Langley <shaunlangley@gmail.com> wrote: > I'm trying to install the jdbc driver on my Mac OS X Lion installation. I'm running JRE 1.6.0_26. > > I've downloaded postgresql-9.0-801.jdbc4.jar > > and run > > java -jar postgresql-9.0-801.jdbc4.jar > > which returns > > Failed to load Main-Class manifest attribute from > postgresql-9.0-801.jdbc4.jar > > Any help trying to resolve this issue would be appreciated! The driver is not a standalone application that can be run with -jar. You include it in the classpath of a larger application; so "installation" is mostly just a case of putting the jar in the right place. See http://jdbc.postgresql.org/documentation/head/classpath.html Oliver
On 06/27/11 8:22 AM, Shaun Langley wrote: > I'm trying to install the jdbc driver on my Mac OS X Lion installation. I'm running JRE 1.6.0_26. > > I've downloaded postgresql-9.0-801.jdbc4.jar > > and run > > java -jar postgresql-9.0-801.jdbc4.jar > > which returns > > Failed to load Main-Class manifest attribute from > postgresql-9.0-801.jdbc4.jar > > > > Any help trying to resolve this issue would be appreciated! JDBC is a runtime library, you need to load it with your application program. -- john r pierce N 37, W 122 santa cruz ca mid-left coast
Oliver Jowett wrote: > Shaun Langley wrote: >> I'm trying to install the jdbc driver on my Mac OS X Lion installation. I'm running JRE 1.6.0_26. >> >> I've downloaded postgresql-9.0-801.jdbc4.jar >> >> and run >> >> java -jar postgresql-9.0-801.jdbc4.jar >> >> which returns >> >> Failed to load Main-Class manifest attribute from >> postgresql-9.0-801.jdbc4.jar >> >> Any help trying to resolve this issue would be appreciated! > The driver is not a standalone application that can be run with -jar. > You include it in the classpath of a larger application; so > "installation" is mostly just a case of putting the jar in the right > place. > See http://jdbc.postgresql.org/documentation/head/classpath.html See also <http://download.oracle.com/javase/tutorial/deployment/jar/index.html> particularly <http://download.oracle.com/javase/tutorial/deployment/jar/run.html> for how "java -jar" actually is used. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
Good question. Do you know what the -jar switch does and why the JDBC Drivers are called Drivers?
On a side note:
On a side note:
http://jdbc.postgresql.org/documentation/83/classpath.html
http://en.wikipedia.org/wiki/JDBC_driver
http://en.wikipedia.org/wiki/JDBC_driver
From: John R Pierce <pierce@hogranch.com>
To: pgsql-jdbc@postgresql.org
Sent: Tuesday, 28 June 2011 1:43 AM
Subject: Re: [JDBC] installing postgresql jdbc driver in Mac OS X Lion
On 06/27/11 8:22 AM, Shaun Langley wrote:
> I'm trying to install the jdbc driver on my Mac OS X Lion installation. I'm running JRE 1.6.0_26.
>
> I've downloaded postgresql-9.0-801.jdbc4.jar
>
> and run
>
> java -jar postgresql-9.0-801.jdbc4.jar
>
> which returns
>
> Failed to load Main-Class manifest attribute from
> postgresql-9.0-801.jdbc4.jar
>
>
>
> Any help trying to resolve this issue would be appreciated!
JDBC is a runtime library, you need to load it with your application
program.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc