Re: Trouble With JDBC - Mailing list pgsql-jdbc

From Corey Mosher
Subject Re: Trouble With JDBC
Date
Msg-id Pine.BSF.4.21.0102161155210.27763-100000@rage.hub.org
Whole thread Raw
In response to Re: Trouble With JDBC  (Bob Kline <bkline@rksystems.com>)
Responses Re: Trouble With JDBC
List pgsql-jdbc
No, to run the program I am using:
java sample

To compile it I am using:
javac sample.java

I have had other simple programs running (the usual hello world apps)
and they seem to work fine.  Just this one for some reason gets the
error.

Corey

On Fri, 16 Feb 2001, Bob Kline wrote:

> On Fri, 16 Feb 2001, Corey Mosher wrote:
>
> > 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.
>
> You might want to start with an introductory book on Java.  It looks as
> if you've included the source code filename extension in your
> command-line invocation of the program.  Drop the ".java" and see what
> happens.
>
>

Corey Mosher

-----------------------------
Hub.Org Networking Services
251 Main St.
Wolfville, NS
Canada
B0P 1X0
Email: corey@hub.org
Phone: (902) 542-3657
-----------------------------
PostgreSQL, Inc.
251 Main St.
Wolfville, NS
Canada
B0P 1X0
Email: corey@pgsql.com
Phone: (902) 542-0713
-----------------------------
Fax:   (902) 542-5386


pgsql-jdbc by date:

Previous
From: Bob Kline
Date:
Subject: Re: Trouble With JDBC
Next
From: Mirko Zeibig
Date:
Subject: newbie: retep wants to have username?