pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jlemcke <jlemcke@netspace.net.au>
To: jdbc postgresql <pgsql-jdbc@postgresql.org>
Subject: CLASSPATH (not)
Date: Sun, 01 Apr 2001 16:15:07 +1000
Message-ID: <3AC6C76B.EAE96FDF@netspace.net.au> (raw)

Hi all,

I've noticed quite a few postings lately about connecting to the jdbc driver. They all seem to mention having the CLASSPATH environment variable set correctly.
In a lot of cases setting CLASSPATH is unnecessary. 
Java 1.2 introduced a feature called the Extension Mechanism which basically allows you to make a package accessible by placing its .jar file in a special Java runtime directory.
All you need to do is copy (or link) your postgresql.jar (or your particular version of it) to the path_to_jre/lib/ext directory; path_to_jre on my Java installation is /usr/java/jdk1.3/jre .
To quote Sun's documentation :

> Any set of packages or classes can easily be made to play the role 
> of an extension. The first step in turning a set of classes into 
> an extension is to bundle them in a JAR file. Once that's done, you
> can turn the software into an extension in two ways: 
>
>   * by placing the JAR file in a special location in the directory 
>     structure of the Java Runtime Environment, in which case it's 
>     called an installed extension. 
>   * by referencing the JAR file in a specified way from the manifest
>     of the another JAR file, in which case it's called a download 
>     extension. 


Check out Sun's Java Tutorial page at :
http://java.sun.com/docs/books/tutorial/ext/index.html
or their documentation at
http://java.sun.com/products/jdk/1.2/docs/guide/extensions/

Have Fun,

John L.



view thread (2+ messages)  latest in thread

Message-ID: <3AC6C76B.EAE96FDF@netspace.net.au>
Permalink:  ../3AC6C76B.EAE96FDF@netspace.net.au/
Also on:    postgresql.org/message-id/3AC6C76B.EAE96FDF@netspace.net.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: jlemcke@netspace.net.au
  Subject: Re: CLASSPATH (not)
  In-Reply-To: <3AC6C76B.EAE96FDF@netspace.net.au>
  References: <3AC6C76B.EAE96FDF@netspace.net.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox