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 98DD0D8EE6 for ; Fri, 4 Nov 2005 00:35:31 -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 48695-02 for ; Fri, 4 Nov 2005 04:35:30 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 025C0D8EAF for ; Fri, 4 Nov 2005 00:35:28 -0400 (AST) Received: (qmail 6638 invoked from network); 4 Nov 2005 04:35:28 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 4 Nov 2005 04:35:28 -0000 In-Reply-To: <436AC425.70801@butterflystitches.com.au> References: <436AC425.70801@butterflystitches.com.au> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <507FBE76-EA04-4F83-8559-418954F89FF4@fastcrypt.com> Cc: jdbc forum Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: begginer question jdbc not working Date: Thu, 3 Nov 2005 23:35:44 -0500 To: Neil Dugan X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/15 X-Sequence-Number: 14113 Neil, Just a shot in the dark, but I'm guessing you don't have your classpath set to the current directory. ie CLASSPATH=./ that will find basic then you will need to add postgresql to it as well. Dave On 3-Nov-05, at 9:15 PM, Neil Dugan wrote: > Hi I am very new to Java. > > I am having trouble getting connection to a database. I installed > the Debian package 'libpg-java' version '8.0-312-1'. > > I can't seem to get it to work. I copied the 'basic.java' example > from '/usr/share/doc/libpg-java/examples/example' to the '/tmp' > directory. Then tried to compile and run it. > $ javac basic.java > basic.java: In class 'example.basic': > basic.java: In method 'example.basic.main(java.lang.String[])': > basic.java:206: warning: The method 'setLogStream' in class > 'java.sql.DriverManager' has been deprecated. > DriverManager.setLogStream(System.err); > ^ > 1 warning > > $ java basic > java.lang.NoClassDefFoundError > at java.lang.VMClassLoader.nativeDefineClass (VMClassLoader.java) > at java.lang.VMClassLoader.defineClass (VMClassLoader.java:94) > at java.lang.ClassLoader.defineClass (ClassLoader.java:673) > at java.security.SecureClassLoader.defineClass > (SecureClassLoader.java:108) > at java.net.URLClassLoader.findClass (URLClassLoader.java:926) > at java.lang.ClassLoader.loadClass (ClassLoader.java:360) > at java.lang.ClassLoader$1.loadClass (ClassLoader.java:1285) > at java.lang.ClassLoader.loadClass (ClassLoader.java:304) > at java.lang.VirtualMachine.main (VirtualMachine.java:99) > > Any help in getting this to work would be appreciated. > > Regard Neil. > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > >