Thread: JDBC classes?

JDBC classes?

From
"Paul Wallace"
Date:
Hello,
    I would like to set up a JDBC conenction to a remote machine. I have a
number of problems / questions before I can do this howver.
    Firstly, I am using an application server where the JDBC files must be
put under a particular directory. If I am to downlaod 'precompiled drivers',
can you tell me firstly why are they .jar files and not .class if the are
precompiled? My app. server reads the .classes (stored ina classses
directory).
    Also, I am not really aware what VM version is insatlled on my machine!
I can tell you that it is 1.2 or up however. What VM is required on the
target?
I think that is all for now as I dont want to exhaust my resources!

Thanks in advance

Paul Wallace
Concerto Developer/Support Consultant
ProSolutions Asia Pacific Co., Ltd.
Tel +66 2 583 6161-5
Fax +662 583 6535
www.ProSolutions-ap.com



Re: JDBC classes?

From
"Nick Fankhauser"
Date:
>     Firstly, I am using an application server where the JDBC files must be
> put under a particular directory. If I am to downlaod
> 'precompiled drivers',
> can you tell me firstly why are they .jar files and not .class if the are
> precompiled? My app. server reads the .classes (stored ina classses
> directory).

A jar file is just a compressed version of the class files in form that java
can handle directly. I'm surprised that your app server can't use a .jar
file.

But... if you really need to, extracting the class files is easy enough-
just use "jar xf <filename>" for example: "jar xf jdbc7.1-1.2.jar"

make sure the files go in the appropriate subdirectory of your classes
directory since they are part of a package.




>     Also, I am not really aware what VM version is insatlled on
> my machine!

the command "java -version" should tell you what you have.




> I can tell you that it is 1.2 or up however. What VM is required on the
> target?

You should be able to work with any version. Assuming you are running v7.1
of PostgreSQL, if you have Java1.2 or above, use jdbc7.1-1.2.jar, otherwise,
use jdbc7.1-1.1.jar


It sounds like you're new to this. I've compiled a FAQ based on common
questions from new folk. It might be helpful to you:
http://www.fankhausers.com/postgresql/jdbc.

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/


Re: JDBC classes?

From
"Dave Cramer"
Date:
Paul,

It is likely that your application server will allow you to put the jar
into it's lib directory.

If for some reason that really isn't possible you can always extract the
class files out of the jar.

No VM is required on the target; only on your machine, or the machine
that is running the java client application.

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Paul Wallace
Sent: Friday, December 07, 2001 5:33 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] JDBC classes?


Hello,
    I would like to set up a JDBC conenction to a remote machine. I have
a number of problems / questions before I can do this howver.
    Firstly, I am using an application server where the JDBC files must
be put under a particular directory. If I am to downlaod 'precompiled
drivers', can you tell me firstly why are they .jar files and not .class
if the are precompiled? My app. server reads the .classes (stored ina
classses directory).
    Also, I am not really aware what VM version is insatlled on my
machine! I can tell you that it is 1.2 or up however. What VM is
required on the target? I think that is all for now as I dont want to
exhaust my resources!

Thanks in advance

Paul Wallace
Concerto Developer/Support Consultant
ProSolutions Asia Pacific Co., Ltd.
Tel +66 2 583 6161-5
Fax +662 583 6535
www.ProSolutions-ap.com



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html