Re: Trouble With JDBC

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Corey Mosher <corey(at)pgsql(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Trouble With JDBC
Date: 2001-02-16 15:00:09
Message-ID: 982335609.3a8d40793d9e2@webmail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Quoting Corey Mosher <corey(at)pgsql(dot)com>:

> Hi,
>
> I am trying to test out the postgres-JDBC driver. I have a
> file called sample.java. It compiles fine, but when I run it
> I get the following error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: sample/java
>
> This is what my classpath is set to:
>
> export
> CLASSPATH=.:/usr/local/java_pkgs/jdk1.1.8/lib/postgresql.jar:$CLASSPATH
>
> Anyone have any idea as to what is wrong? It looks as if it can't find
> the
> sample.class file, but it does exist in the current directory.

Erm, you are not including .class in the java line are you?

eg: java sample.class?

If so, drop the .class. It's looking for a file sample/class.class not
sample.class

;-)

Peter

--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Stephenson 2001-02-16 15:13:44 Re: Trouble With JDBC
Previous Message Mirko Zeibig 2001-02-16 14:55:07 newbie: retep wants to have username?