This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
newbie mysql jdbc
- To: <java at gcc dot gnu dot org>
- Subject: newbie mysql jdbc
- From: "Attila Soki" <atiware at gmx dot net>
- Date: Sun, 14 Oct 2001 08:37:38 +0200
hi,
please help, can anybody tell me what wrong is in my code?? (with sun jdk
1.1.8 works this code)
or any rtfm please....
here is my code:
import java.sql.*;
import java.net.*;
import java.io.*;
public class MySqlJdbcTest {
public static void main (String[] args) {
try {
Driver
drvName=(Driver)Class.forName("org.gjt.mm.mysql.Driver").newInstance();
DriverManager.registerDriver(drvName);
{...more code....}
}
catch (Exception e) {
System.out.println("Error 1:"+e.getMessage());
}
}
}
compile: gcj-3.0 -Wall --main=MySqlJdbcTest MySqlJdbcTest.java -o
MySqlJdbcTest
after run i get the following output: Error 1:null
i use the mm.mysql.jdbc.1.2.c jdbc driver.
thanx.
cheers,
ati
debian 2.2.19/intel PII
gcc:
Configured with:
../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/u
sr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as -
-with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-in
cluded-gettext --disable-checking --enable-threads=posix --enable-java-gc=bo
ehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.0.2 20010922 (Debian prerelease)