| From: | Yasunari Tosa <ytosa(at)att(dot)net> | 
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org | 
| Subject: | j2sdk1.4.2_01 vs. CLASSPATH problem? | 
| Date: | 2003-10-01 03:07:02 | 
| Message-ID: | 3F7A44D6.4050606@att.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-jdbc | 
Hi,
I would really appreciate your help in learning JDBC through PostgreSQL.
Under j2sdk1.4.2_01, setting CLASSPATH causes exception in class not
found error.   This exception is thrown even the simplest HelllWorld
class.  Did they(SUN) change the behavior of CLASSPATH?
I'm running RedHat 9 with Linux 2.4.20-19.9 kernel.
Here is the details.
/home/tosa/pgsqlDev/java>javac client2.java
client2.java:7: package org.postgresql.util does not exist
import org.postgresql.util.*;
^
client2.java:67: cannot resolve symbol
symbol  : class PSQLException
location: class client2
    catch(PSQLException e)
          ^
2 errors
......OK.  I set CLASSPATH
/home/tosa/pgsqlDev/java>setenv CLASSPATH /usr/share/pgsql/postgresql.jar
......Now compiles
/home/tosa/pgsqlDev/java>javac client2.java
......However, I cannot run
/home/tosa/pgsqlDev/java>java client2
Exception in thread "main" java.lang.NoClassDefFoundError: client2
......So, I unsetenv CLASSPATH
/home/tosa/pgsqlDev/java>unsetenv CLASSPATH
/home/tosa/pgsqlDev/java>java client2
Exception in thread "main" java.lang.NoClassDefFoundError:
org/postgresql/util/PSQLException
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chris Faulkner | 2003-10-01 09:28:36 | compatibility of database files - cygwin to Linux | 
| Previous Message | Oliver Jowett | 2003-09-29 20:24:36 | Re: problem with setting boolean value on |