pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CLASSPATH (not)
2+ messages / 2 participants
[nested] [flat]

* CLASSPATH (not)
@ 2001-04-01 06:15  jlemcke <jlemcke@netspace.net.au>
  0 siblings, 0 replies; 2+ messages in thread

From: jlemcke @ 2001-04-01 06:15 UTC (permalink / raw)
  To: pgsql-jdbc

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* CLASSPATH (not)
@ 2006-01-03 23:12  Michael Schmidt <michaelmschmidt@msn.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Schmidt @ 2006-01-03 23:12 UTC (permalink / raw)
  To: pgsql-jdbc

I know this thread is a little old, but thought I would add this for folks searching the archives.  The following link describes dynamic loading of the jdbc driver using URLClassLoader.

http://forum.java.sun.com/thread.jspa?forumID=48&threadID=509208<http://forum.java.sun.com/th...;

Michael Schmidt

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-01-03 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-01 06:15 CLASSPATH (not) jlemcke <jlemcke@netspace.net.au>
2006-01-03 23:12 CLASSPATH (not) Michael Schmidt <michaelmschmidt@msn.com>

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