pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Lewis <mark.lewis@mir3.com>
To: Benjamin Stookey <jamstooks@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Deploying my application (nesting the jar)
Date: Mon, 21 Nov 2005 15:48:00 -0800
Message-ID: <1132616880.5937.4.camel@archimedes> (raw)
In-Reply-To: <20051121232727.30929.qmail@web35013.mail.mud.yahoo.com>
References: <20051121232727.30929.qmail@web35013.mail.mud.yahoo.com>

Well, you could actually nest the jar inside of another jar (we've done
it here before), but you need to do some ugly things like using your own
classloader and doing some tricks to avoid the must-be-the-same-
classloader security checks DriverManager does.

Just including the postgres driver classes directly in your jar file is
simpler, and that's what we mostly do when we need to bundle an
application with build-in PostgreSQL support.  Not sure why it's not
working for you.

-- Mark Lewis

On Mon, 2005-11-21 at 15:27 -0800, Benjamin Stookey wrote:
> I realize that it's not possible to nest the jar in
> another jar, but I was wondering if anyone could give
> me a suggestion for deploying my application using
> this jar file.
> 
> I did try extracting the jar to include the class
> files in my classpath (is this a bad idea?), but once
> I did that I get the "No suitable driver"
> SQLException. I'm probably making some blundering
> mistake with my classpath, but I can't figure it out.
> 
> How have other people done this? Ideally, I'd like my
> application to be in one jar file to make it easier
> for my users. I'm still hoping this is possible...
> 
> Thanks for the help,
> -Ben
> 
> /**
> * @develEnv	ECLIPSE
> * @javaVer	JAVA 1.4.2_08
> * @OPSystem	SUSE LINUX
> */
> 
> 
> 	
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster



view thread (7+ messages)  latest in thread

Message-ID: <1132616880.5937.4.camel@archimedes>
Permalink:  ../1132616880.5937.4.camel@archimedes/
Also on:    postgresql.org/message-id/1132616880.5937.4.camel@archimedes

 · 

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: mark.lewis@mir3.com, jamstooks@yahoo.com
  Subject: Re: Deploying my application (nesting the jar)
  In-Reply-To: <1132616880.5937.4.camel@archimedes>
  References: <20051121232727.30929.qmail@web35013.mail.mud.yahoo.com> <1132616880.5937.4.camel@archimedes>

* 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