Re: Connect via odbc from Windows to Linux - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Connect via odbc from Windows to Linux
Date
Msg-id 4935E69C.4060300@opencloud.com
Whole thread Raw
In response to Re: Connect via odbc from Windows to Linux  (Bruce Hyatt <brucejhyatt@yahoo.com>)
List pgsql-jdbc
Bruce Hyatt wrote:
> --- On Tue, 12/2/08, Oliver Jowett <oliver@opencloud.com> wrote:
>
>> You don't have the driver in your classpath.
>
> For some reason I had assumed that Java EE 5 SDK included the driver

It doesn't as far as I know.

> So I downloaded and ran various precompiled versions of the driver from jdbc.postgresql.org and always got the error
"failedto load main-class manifest attribute."  

The driver is not a selfcontained Java program and does not provide a
main class. Trying to run it with -jar will produce the above error. You
want to run with the driver jar in the classpath (e.g. via a -classpath
argument to your JVM) *in addition to* your own code, and specify your
own main class as the entry point.

> Sorry for the newbie questions and problems. I thought once I had all the components working it would be fairly
simpleto implement jdbc to PostgreSQL. This list also seemed more appropriate than the novice list. 

Frankly, you may be better off looking for an introductory Java forum
for help. Understanding how the JVM locates classes and how to modify
your classpath is a prerequisite for using *any* sort of 3rd party
library; it's not specific to JDBC or PostgreSQL.

-O

pgsql-jdbc by date:

Previous
From: Bruce Hyatt
Date:
Subject: Re: Connect via odbc from Windows to Linux
Next
From: "Ken Boss"
Date:
Subject: Re: text type handling