Compiling with mysql

Thu Aug 21 19:20:00 GMT 2008

I am using JavaNativeCompiler from windows and also gcj form ubuntu

1) When i delete the references to com.mysql and the mysql lib from the
project, i can compile without problems.

I tryed to include a class as sugested in some place:
public class ForceInclude {
	private static final Class class1 = com.mysql.jdbc.Driver.class;

	ForceInclude() {

3) Compiling with JavaNativeCompiler from windows generating code only for
"undefined reference to `java::util::Iterator*

4) Compiling the same file from ubuntu with gcj compiler containing lib 
libgcj-4.2.jar i get:
cannot find file for class java.sql.Connection
I looked inside the libgcj-4.2.jar and it doesnt have a directory with
java.sql folder, so i puted that directory from the jre

5) Compiling again from ubuntu but with modified libgcj-4.2.jar including
the sql package
com/mysql/jdbc/ In class
com/mysql/jdbc/ In method
com/mysql/jdbc/ error: cannot find file
for class java.sql.SQLClientInfoException

I dont think that the right way is modifying the libs from the compiler,
there should be a better way, or there is some information that i dont know


Lorenzo De Vito wrote:
> ezer wrote:
>> I am triyng for a week to compile a project using mysql. I get all kind
>> of
>> errors. 
>> i used mysql-connector-java-3.1.14-bin.jar,
>> mysql-connector-java-5.1.6-bin.jar and mysql-connector-java-5.1.6-bin.jar
>> I use something like that gcj --main=MyMainClass -o MyExec MyJar.jar
>> The MyJar i tryed to generate with all the java versions, 1.4, 15 and 1.6
>> I searched the net for info but i couldnt find anything...
> ...something ???
> ...all kind of errors ???
> ??????????????????
> paste the error output or a log in your email...please

View this message in context:
Sent from the gcc - java mailing list archive at

More information about the Java mailing list