From: Taufik Chowi <m4g1c14n2000@yahoo.com>
To: ezer <andres.a@adinet.com.uy>
Cc: java@gcc.gnu.org
Subject: Re: Mysql and -static--libgcj
Date: Fri, 26 Sep 2008 03:57:00 -0000 [thread overview]
Message-ID: <415556.79734.qm@web54601.mail.re2.yahoo.com> (raw)
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 <andres.a@adinet.com.uy>
To: java@gcc.gnu.org
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.
next reply other threads:[~2008-09-26 3:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 3:57 Taufik Chowi [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-25 16:42 ezer
2008-09-26 3:26 ` Taufik Chowi
2008-09-26 3:35 ` ezer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=415556.79734.qm@web54601.mail.re2.yahoo.com \
--to=m4g1c14n2000@yahoo.com \
--cc=andres.a@adinet.com.uy \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).