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 C75BED7201 for ; Sat, 17 Sep 2005 08:08:52 -0300 (ADT) 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 68159-07 for ; Sat, 17 Sep 2005 11:08:46 +0000 (GMT) Received: from web26608.mail.ukl.yahoo.com (web26608.mail.ukl.yahoo.com [217.146.176.58]) by svr1.postgresql.org (Postfix) with SMTP id A7BDDD6EB0 for ; Sat, 17 Sep 2005 08:08:46 -0300 (ADT) Received: (qmail 65849 invoked by uid 60001); 17 Sep 2005 11:08:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.it; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type; b=kJnFF7PmAcLfJEbCcXaC63RxDrup5lkFYR+jv3haSG3dI42i/u4+w2OLuFwGM2H0YhMluiR6OYNcQP3oum09ZG1gjATBcDVKYl9mx3qa9tmUgAmQ/GseYE/iZ1o/Uk3cPtrGPoFnfHLxo2lEkbtz9KQ6MwqEr2h5cEec9HlCrL8= ; Message-ID: <20050917110848.65847.qmail@web26608.mail.ukl.yahoo.com> Received: from [82.60.45.124] by web26608.mail.ukl.yahoo.com via HTTP; Sat, 17 Sep 2005 13:08:48 CEST Date: Sat, 17 Sep 2005 13:08:48 +0200 (CEST) From: Gianluigi Subject: GCJ jdbc driver compilation To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.374 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374] X-Spam-Level: X-Archive-Number: 200509/70 X-Sequence-Number: 13855 Hi to all, i have a problem: i'm trying to compile with GCJ a java program that uses jdbc driver (postgresql-8.0-311.jdbc3.jar ) under Mingw: the program have that statement Class.forName("org.postgresql.Driver"); i can compile it but when i try to execute it i have that error: java.lang.ClassNotFoundException: org.postgresql.Driver not found in [file:.\, core:/] also if i try to set my CLASSPATH mingw shell variable in the right way. I have also postgresql-8.0-311.jdbc3.jar in the same directory of executable. So i try to force the loading of the class: private static final Class class1 = gnu.java.locale.Calendar.class; private static final Class class2 = gnu.java.locale.LocaleInformation.class; private static final Class class4 = org.postgresql.Driver.class; but now the compiler fails at linking time: $ gcj --main=PwServer PwServer.java -o pwserver --classpath=/home/user/pwserver/ PwServer.java: In class `PwServer': PwServer.java: In method `()': PwServer.java:30: error: Class `org.postgresql.Driver' not found in type declaration. private static final Class class4 = org.postgresql.Driver.class; ^ 1 error user@JACOPOPC ~/pwserver $ gcj --main=PwServer PwServer.java -o pwserver --classpath=/home/user/pwserver/postgresql-8.0-311.jdbc3.jar C:/DOCUME~1/user/IMPOST~1/Temp/cciEbaaa.o(.text+0xa48d): In function `ZN8PwServer18__U3c_clinit(unsigned e_E, void)': C:/Games/1.0/home/user/pwserver/PwServer.java:1: undefined reference to `org::postgresql::Driver::class$' C:/DOCUME~1/user/IMPOST~1/Temp/cciEbaaa.o(.text+0xa4fb):C:/Games/1.0/home/user/pwserver/PwServer.java:30: undefined reference to `org::postgresql::Driver::class$' C:/DOCUME~1/user/IMPOST~1/Temp/cciEbaaa.o(.text+0xa50e):C:/Games/1.0/home/user/pwserver/PwServer.java:30: undefined reference to `org::postgresql::Driver::class$' collect2: ld returned 1 exit status So i try to compile the jdbc driver as a shared library with that command: # gcj --shared postgresql-8.0-311.jdbc3.jar -o libpo.so but the result is that: org/postgresql/ssl/MakeSSL.java: In class `org.postgresql.ssl.MakeSSL': org/postgresql/ssl/MakeSSL.java: In method `org.postgresql.ssl.MakeSSL.convert(org.postgresql.core.PGStream,java.util.Properties)': org/postgresql/ssl/MakeSSL.java:27: error: cannot find file for class javax.net.ssl.SSLSocketFactory org/postgresql/ssl/MakeSSL.java:27: error: cannot find file for class javax.net.ssl.SSLSocketFactory org/postgresql/ssl/MakeSSL.java:37: error: cannot find file for class javax.net.ssl.SSLSocketFactory org/postgresql/ssl/MakeSSL.java:37: confused by earlier errors, bailing out At this time i dunno what to do............any suggestion or help are very well accepted!!! Thank, Muzero from italy ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.messenger.yahoo.com