Re: Mysql and -static--libgcj

Taufik Chowi <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Dear Ezer,

ok this time i will compile it with my linux server.
it runs on fedora core 4 (quite old) >.<
i cant run using -static-libgcj because my gcj version is too old i think (i am not sure too, because i am quite new with gcj)
# gcj -O2 mysql-connector-java-3.0.17-ga-bin.jar MysqlConnect.java --main=MysqlConnect -static-libgcj
gcj: unrecognized option '-static-libgcj'

instead i used this
# gcj -O2 mysql-connector-java-3.0.17-ga-bin.jar MysqlConnect.java --main=MysqlConnect -findirect-dispatch
# ./a.out
MySQL Connect Example.
Connected to the database
Query executed
Disconnected from database
Execution Time: 0 seconds

delay of 10 seconds?!?!?! are you saying that you've got output "Execution Time: 10 seconds" ?? 
that is crazy.. i have never seen one myself (though my experience with gcj is still a bit short ^^)

here is my gcj --version for linux 
# gcj --version
gcj (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# mysql --version
mysql  Ver 14.7 Distrib 4.1.11, for redhat-linux-gnu (i386)


@first question
my windows version? i can use it without having to install mingw or anything like that
http://www.thisiscool.com/gcc_mingw.htm
i downloaded this one http://static.thisiscool.com/gcc/gcc43-20061204.tar.bz2
extract and use it ^^; no setup (if the memory serves me right)

@second question
hmmm, you know i have read it somewhere , i think it is called native cross compiler or anything like that, it allows you compile a native code for another Operating System
but as you may have guessed, i havent tried it >.< , i think it is kinda like high level stuff or anything like that , since i am really confused reading the article :( (or perhaps it is only me)


Cheers and God Bless,

Chowi




----- Original Message ----
From: ezer <[email protected]>
To: [email protected]
Sent: Friday, September 26, 2008 10:34:37 AM
Subject: Re: Mysql and -static--libgcj


Oh thanks for the time. i also see that for you its run fast. Without linking
static i have a delay in the run of 10 seconds..

Can you tell me 2 thinks. 
1) How do you installed that version in windows.. i tryed with Java Native
compile, Mingw etc.. without succes. 
2) can you generate linux exec with that windows version ? 

I will try to install that version exactly as you indicate to me..
Thanks you a lot....



Taufik Chowi wrote:
> 
> 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
> 
> 
>      
> 
> 

-- 
View this message in context: http://www.nabble.com/Mysql-and--static--libgcj-tp19673573p19681963.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.