Re: Compiling with mysql

ezer <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
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.

2)
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
linux
"undefined reference to `java::util::Iterator*
java::sql::SQLException::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/JDBC4ClientInfoProviderSP.java: In class
'com.mysql.jdbc.JDBC4ClientInfoProviderSP':
com/mysql/jdbc/JDBC4ClientInfoProviderSP.java: In method
'com.mysql.jdbc.JDBC4ClientInfoProviderSP.setClientInfo(java.sql.Connection,java.util.Properties)':
com/mysql/jdbc/JDBC4ClientInfoProviderSP.java:139: 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
now...

Thanks




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: http://www.nabble.com/Compiling-with-mysql-tp19092090p19095165.html
Sent from the gcc - java mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.