Re: Deploying my application (nesting the jar)

From: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>
To: Benjamin Stookey <jamstooks(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Deploying my application (nesting the jar)
Date: 2005-11-21 23:48:00
Message-ID: 1132616880.5937.4.camel@archimedes
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-11-22 00:28:00 Re: Can PostgreSQL do data type automated casting in prepared
Previous Message Mark Lewis 2005-11-21 23:37:26 Re: Can PostgreSQL do data type automated casting in