How to use jdbc? (with attachement)

Adrian Custer acuster@nature.berkeley.edu
Fri Jul 27 21:18:00 GMT 2001


Woops forgot to attach the file, sorry for the repeat. --adrian


Hey everyone,

I'm trying out jdbc. I finally got the program working using sun's java
but I don't like it, I'd rather be Free. :-)


I have a program (attached). When I do the following:

1) setenv PATH /usr/local/gcc3_0/bin:$PATH
   setenv LD_LIBRARY_PATH /usr/local/gcc3_0/lib/
2) gcj --main=DatabaseTester.java -o DatabaseTester DatabaseTester.java 

I get:

/home/acuster/tmp/ccuuonhUmain%O: In function `main':
/home/acuster/tmp/ccafMTcVmain.i(.text+0x1a): undefined reference to
`DatabaseTester::java::class$'
collect2: ld returned 1 exit status

I tried copying the postgres .jar file into /usr/local/gcc3_0/share/lib/
but that didn't help. I tried a bunch of other stuff. If anyone has a
good example of how one can set up the compiler, userProgramme, Database
to get them working together, please let me know.

Thanks for any info,
adrian
acuster@nature.berkeley.educational



More information about the Java mailing list