X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C878811F6668 for ; Mon, 10 Apr 2006 23:33:31 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 required=5 tests=[none] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id ODgaJDUALiSc for ; Mon, 10 Apr 2006 23:31:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.179]) by postgresql.org (Postfix) with ESMTP id 8679911F677C for ; Mon, 10 Apr 2006 22:51:14 -0300 (ADT) Received: by pproxy.gmail.com with SMTP id x66so1012106pye for ; Mon, 10 Apr 2006 18:51:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T1BFObzrNHw77uyjgtawaCCPMZQE3H3vRMNNCSJaSgyOpT4SLwCFk0/hc8sYtXLRIzoljffRf29cmHPfbqW9yDYANhKfbnAk/ObG9uLxz5NOXHeHKY9IIbg5jVbg+1ADLjS6HUyrw7KYghutGZ/84sTuoq28slwsk/LNzDcETcw= Received: by 10.35.121.2 with SMTP id y2mr192882pym; Mon, 10 Apr 2006 18:51:15 -0700 (PDT) Received: by 10.35.78.18 with HTTP; Mon, 10 Apr 2006 18:51:15 -0700 (PDT) Message-ID: <3fccaa690604101851t50f291cak23c2cee3cf3b59ba@mail.gmail.com> Date: Mon, 10 Apr 2006 19:51:15 -0600 From: "Andres Olarte" To: pgsql-jdbc@postgresql.org Subject: Re: I just can't use the org.postgresql.Driver class... Please help! In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Archive-Number: 200604/79 X-Sequence-Number: 15013 You must catch an Exception that *might* be thrown, in this case it's ClassNotFoundException. Change: public static void main(String[] args) { Class.forName("org.postgresql.Driver"); } to public static void main(String[] args) { try { Class.forName("org.postgresql.Driver"); } catch (ClassNotFoundException e ){ } } This way it'll compile. This has nothing to do with JDBC, this is basic Java stuff.