Mysql and -static--libgcj
Taufik Chowi
m4g1c14n2000@yahoo.com
Fri Sep 26 03:26:00 GMT 2008
Dear Ezer,
i tried compiling your code, and it works perfectly no problem from Windows
i commented this code because i am so lazy to create new record in this table >.<
//Vector row = new Vector();
//row.add(rs.getInt("id"));
//row.add(rs.getString("titulo"));
//row.add(rs.getString("descripcion"));
D:\gcc-4.3\bin>gcj -O2 mysql-connector-java-3.0.17-ga-bin.jar MysqlConnect.java --main=MysqlConnect -static-libgcj
D:\gcc-4.3\bin>a
MySQL Connect Example.
Connected to the database
Query executed
Disconnected from database
Execution Time: 0 seconds
last time i also had the same NoClassDefFoundError problem, but usually everything will be ok if you added
private static final Class class3 = com.mysql.jdbc.Driver.class;//This will not compile with jde in my past experience , only include this to solve some of the NoClassDefFoundError from gcj
Cheers and God Bless,
Chowi
More information about the Java
mailing list