X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E69E3D98C4 for ; Mon, 21 Nov 2005 19:48:00 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96461-03 for ; Mon, 21 Nov 2005 23:48:03 +0000 (GMT) X-Greylist: delayed 00:10:29.910393 by SQLgrey- Received: from mir3-fs.mir3.com (mail.mir3.com [65.208.188.100]) by svr1.postgresql.org (Postfix) with ESMTP id 271AAD7E3E for ; Mon, 21 Nov 2005 19:47:57 -0400 (AST) Received: mir3-fs.mir3.com 172.16.1.11 from 172.16.2.68 172.16.2.68 via HTTP with MS-WebStorage 6.0.6249 Received: from archimedes.mirlogic.com by mir3-fs.mir3.com; 21 Nov 2005 15:48:00 -0800 Subject: Re: Deploying my application (nesting the jar) From: Mark Lewis To: Benjamin Stookey Cc: pgsql-jdbc@postgresql.org In-Reply-To: <20051121232727.30929.qmail@web35013.mail.mud.yahoo.com> References: <20051121232727.30929.qmail@web35013.mail.mud.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: MIR3, Inc. Date: Mon, 21 Nov 2005 15:48:00 -0800 Message-Id: <1132616880.5937.4.camel@archimedes> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-22) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200511/140 X-Sequence-Number: 14238 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