Re: Connect via odbc from Windows to Linux

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: brucejhyatt(at)yahoo(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org, John R Pierce <pierce(at)hogranch(dot)com>
Subject: Re: Connect via odbc from Windows to Linux
Date: 2008-12-03 01:53:32
Message-ID: 4935E69C.4060300@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Bruce Hyatt wrote:
> --- On Tue, 12/2/08, Oliver Jowett <oliver(at)opencloud(dot)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 "failed to 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 simple to 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ken Boss 2008-12-03 14:43:18 Re: text type handling
Previous Message Bruce Hyatt 2008-12-03 01:40:09 Re: Connect via odbc from Windows to Linux