public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GCJ Compile Error SQLite JDBC
@ 2008-09-11 11:05 Taufik Chowi
  2008-09-11 11:13 ` Andrew Haley
  0 siblings, 1 reply; 16+ messages in thread
From: Taufik Chowi @ 2008-09-11 11:05 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

Dear Andrew,

Certainly 
http://files.zentus.com/sqlitejdbc/sqlitejdbc-v053.jar

btw he is number one result, if you try googling sqlite jdbc , he comes out on top
and some other sqlite jdbc creator also praise his jdbc
such as http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC
"The original Zentus's SQLite JDBC driver http://www.zentus.com/sqlitejdbc/ itself is an excellent utility for using SQLite databases from Java language , and our SQLiteJDBC library also relies on its implementation."

btw andrew.. thanks a lot for your help :) ... 



Cheers and God Bless,

Chowi



----- Original Message ----
From: Andrew Haley <aph@redhat.com>
To: Taufik Chowi <m4g1c14n2000@yahoo.com>
Cc: java@gcc.gnu.org
Sent: Thursday, September 11, 2008 5:50:54 PM
Subject: Re: GCJ Compile Error SQLite JDBC

Taufik Chowi wrote:
> Dear Andrew,
> 
> alright , so extracting the jar file.. i have done that :)
> using winrar.
> 
> ok i can see couple of files and 2 folders
> there are one thing that really caught my attention is 
> sqlitejdbc-v053\org\sqlite\SQLite.class sized at 3.51 MB (3,690,385 bytes) <-- if 2MB is too big, then i think this 3.5MB is definitely too big

Oh.  My.  God.

What the hell is that?  I have never seen such a thing.

You got a URL for that?

Andrew.



      

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: GCJ Compile Error SQLite JDBC
@ 2008-09-24  3:12 Taufik Chowi
  0 siblings, 0 replies; 16+ messages in thread
From: Taufik Chowi @ 2008-09-24  3:12 UTC (permalink / raw)
  To: Nektarios K. Papadopoulos; +Cc: java

Dear Nektarios,

Thanks for the information. I have one question in your built, is that sqlitejdbc-v044-native.jar can be used in windows box?
i mean, i am not sure, generally if you make native using linux , that means it will generate a native for linux right?
i know in gcj there is something called cross native compiler or something along that line that allow gcj to compile for specific operating system native executable from any linux os, but i dont know if the "make native" can do that or not >.<

my java program need to run well on both Windows and Linux operating system (thanks to everyone, right now, i know for sure it will run well on Linux OS)


again thanks a lot, finally i can see that my java program can definitely be compiled and working with a very powerful serverless database :)


Cheers,


Chowi




----- Original Message ----
From: Nektarios K. Papadopoulos <npapadop@inaccessnetworks.com>
To: Taufik Chowi <m4g1c14n2000@yahoo.com>
Cc: Marco Trudel <marco@mtsystems.ch>; java@gcc.gnu.org
Sent: Tuesday, September 23, 2008 6:14:53 PM
Subject: Re: GCJ Compile Error SQLite JDBC

On 2008-09-23 13:18, Taufik Chowi wrote:
> Dear Marco,
> 
> Oh really?
> ok thanks a lot for the information.
> i will try to find the "build option" that used JNI to access native compiled sqlite library.
> 
> 

I used sqlitejdbc-v044. The build option is:

make native

You get:
build/sqlitejdbc-v044-native.jar
build/Default-i686/libsqlitejdbc.so

I then used a sample class using sqlite jdbc, compiled to .class and used gcj 
like this:

gcj -o myTest -findirect-dispatch -fjni --main=mypackage.myTest 
sqlitejdbc-v044-native.jar mypackage/myTest.class

BTW,
gcj --version
gcj (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu6)

Cheers

-- 
Nektarios K. Papadopoulos


      

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: GCJ Compile Error SQLite JDBC
@ 2008-09-23 10:19 Taufik Chowi
  2008-09-23 11:15 ` Nektarios K. Papadopoulos
  0 siblings, 1 reply; 16+ messages in thread
From: Taufik Chowi @ 2008-09-23 10:19 UTC (permalink / raw)
  To: Marco Trudel; +Cc: java

Dear Marco,

Oh really?
ok thanks a lot for the information.
i will try to find the "build option" that used JNI to access native compiled sqlite library.


:D

Cheers



----- Original Message ----
From: Marco Trudel <marco@mtsystems.ch>
To: Taufik Chowi <m4g1c14n2000@yahoo.com>
Cc: Nektarios K. Papadopoulos <npapadop@inaccessnetworks.com>; java@gcc.gnu.org
Sent: Tuesday, September 23, 2008 5:13:25 PM
Subject: Re: GCJ Compile Error SQLite JDBC

Taufik Chowi wrote:
> Dear Nektarios,
> 
> Actually i never want to compile sqlitejdbc jar files, but unless i do that i wont be able to use it from my gcj compiled java code >.<
> so here is what happened :
> 1. write a program in java... uses the sqlite jdbc....
> 2. everything works perfectly... no problem whatsoever...
> 3. try to compile the written java program into native by using gcj. now, i cant make my gcj compiled java program to work properly unless i also compile the sqlitejdbc jar file
> 4. puff.... problem occured because i cant compile sqlitejdbc jar file with gcj hence my gcj compiled java program wont work too 
> 
> or do you have any other alternative ? perhaps by using a non pure java jdbc of sqlite?

Exactly this has been answered in the mail:

sqlitejdbc does this in order to provide a cross-platform (pure Java) 
sqlite
jdbc driver. If one plans to compile the resulting jarfile with gcj 
there is no
need to do this trick in the first place.

sqlitejdbc provides a build option not to include the MIPS emulator and 
use JNI
to access the native compiled sqlite library.


Marco

> 
> Thanks a lot for your help :)
> 
> Cheers and God Bless,
> 
> Chowi
> 
> 
> 
> ----- Original Message ----
> From: Nektarios K. Papadopoulos <npapadop@inaccessnetworks.com>
> To: Andrew Haley <aph@redhat.com>
> Cc: Taufik Chowi <m4g1c14n2000@yahoo.com>; java@gcc.gnu.org
> Sent: Tuesday, September 23, 2008 4:23:14 PM
> Subject: Re: GCJ Compile Error SQLite JDBC
> 
> On 2008-09-11 14:12, Andrew Haley wrote:
>> Taufik Chowi wrote:
>>> Dear Andrew,
>>>
>>> Certainly 
>>> http://files.zentus.com/sqlitejdbc/sqlitejdbc-v053.jar
>>>
>>> btw he is number one result, if you try googling sqlite jdbc , he comes out on top
>>> and some other sqlite jdbc creator also praise his jdbc
>>> such as http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC
>>> "The original Zentus's SQLite JDBC driver http://www.zentus.com/sqlitejdbc/ itself is an excellent utility for using SQLite databases from Java language , and our SQLiteJDBC library also relies on its implementation."
>> OK, this jar file is the result of compiling sqlite (written in C?)
>> into MIPS machine code and then embedding a MIPS emulator into
>> Java.  The resulting enormous jarfile is the result.
> 
> sqlitejdbc does this in order to provide a cross-platform (pure Java) sqlite 
> jdbc driver. If one plans to compile the resulting jarfile with gcj there is no 
> need to do this trick in the first place.
> 
> sqlitejdbc provides a build option not to include the MIPS emulator and use JNI 
> to access the native compiled sqlite library.
> 
> However, I never tried to use the resulting jarfile + native library with gcj.
> 
>> I am confident in saying, for the first time ever that we have a
>> jar file that cannot be compiled with gcj.
>>
> ok, but IMHO there is no need to compile this jar file with gcj ;-)
> 


      

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: GCJ Compile Error SQLite JDBC
@ 2008-09-23  9:33 Taufik Chowi
  2008-09-23 10:14 ` Marco Trudel
  0 siblings, 1 reply; 16+ messages in thread
From: Taufik Chowi @ 2008-09-23  9:33 UTC (permalink / raw)
  To: Nektarios K. Papadopoulos; +Cc: java

Dear Nektarios,

Actually i never want to compile sqlitejdbc jar files, but unless i do that i wont be able to use it from my gcj compiled java code >.<
so here is what happened :
1. write a program in java... uses the sqlite jdbc....
2. everything works perfectly... no problem whatsoever...
3. try to compile the written java program into native by using gcj. now, i cant make my gcj compiled java program to work properly unless i also compile the sqlitejdbc jar file
4. puff.... problem occured because i cant compile sqlitejdbc jar file with gcj hence my gcj compiled java program wont work too 

or do you have any other alternative ? perhaps by using a non pure java jdbc of sqlite?


Thanks a lot for your help :)

Cheers and God Bless,

Chowi



----- Original Message ----
From: Nektarios K. Papadopoulos <npapadop@inaccessnetworks.com>
To: Andrew Haley <aph@redhat.com>
Cc: Taufik Chowi <m4g1c14n2000@yahoo.com>; java@gcc.gnu.org
Sent: Tuesday, September 23, 2008 4:23:14 PM
Subject: Re: GCJ Compile Error SQLite JDBC

On 2008-09-11 14:12, Andrew Haley wrote:
> Taufik Chowi wrote:
>> Dear Andrew,
>>
>> Certainly 
>> http://files.zentus.com/sqlitejdbc/sqlitejdbc-v053.jar
>>
>> btw he is number one result, if you try googling sqlite jdbc , he comes out on top
>> and some other sqlite jdbc creator also praise his jdbc
>> such as http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC
>> "The original Zentus's SQLite JDBC driver http://www.zentus.com/sqlitejdbc/ itself is an excellent utility for using SQLite databases from Java language , and our SQLiteJDBC library also relies on its implementation."
> 
> OK, this jar file is the result of compiling sqlite (written in C?)
> into MIPS machine code and then embedding a MIPS emulator into
> Java.  The resulting enormous jarfile is the result.

sqlitejdbc does this in order to provide a cross-platform (pure Java) sqlite 
jdbc driver. If one plans to compile the resulting jarfile with gcj there is no 
need to do this trick in the first place.

sqlitejdbc provides a build option not to include the MIPS emulator and use JNI 
to access the native compiled sqlite library.

However, I never tried to use the resulting jarfile + native library with gcj.

> 
> I am confident in saying, for the first time ever that we have a
> jar file that cannot be compiled with gcj.
> 
ok, but IMHO there is no need to compile this jar file with gcj ;-)

-- 
Nektarios K. Papadopoulos


      

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: GCJ Compile Error SQLite JDBC
@ 2008-09-11  9:55 Taufik Chowi
  2008-09-11 10:51 ` Andrew Haley
  0 siblings, 1 reply; 16+ messages in thread
From: Taufik Chowi @ 2008-09-11  9:55 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

Dear Andrew,

alright , so extracting the jar file.. i have done that :)
using winrar.

ok i can see couple of files and 2 folders
there are one thing that really caught my attention is 
sqlitejdbc-v053\org\sqlite\SQLite.class sized at 3.51 MB (3,690,385 bytes) <-- if 2MB is too big, then i think this 3.5MB is definitely too big

C and C++, i actually know how to program with them but i dont think i have ever built large C or C++ programs

if i cant compile this using gcj  unless i have an ample amount of experience in building large C / C++ programs, then i think i will give this sqlite up T.T
but at least, can you take a peak on the problem i have in other HSQLDB problem http://gcc.gnu.org/ml/java/2008-09/msg00020.html
it looks more basic (at least the error message) , i believe that there are something wrong along the compiling command i used. 



again thanks a lot :D

Cheers and God Bless,

Chowi



----- Original Message ----
From: Andrew Haley <aph@redhat.com>
To: Taufik Chowi <m4g1c14n2000@yahoo.com>
Cc: java@gcc.gnu.org
Sent: Thursday, September 11, 2008 4:42:40 PM
Subject: Re: GCJ Compile Error SQLite JDBC

Taufik Chowi wrote:

> I see , umh , i am really sorry but i am very very new with gcj .. i know this is a stupid question. (yes i have read the gcj manual)
> but how do i split the jar file ?
> i mean do i have to do something like unjar the jar file?

Yes.  jar xf file.

You will then have a bunch of class files that you can compile.
You can also use jar to build a bunch of smaller jarfiles.  You
can compile these separately.

I guess the real problem here is that we don't know what you
don't know.  Have you any experience of, for example, building
large C and C++ programs?

Andrew.


      

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: GCJ Compile Error SQLite JDBC
@ 2008-09-11  9:33 Taufik Chowi
  2008-09-11  9:43 ` Andrew Haley
  0 siblings, 1 reply; 16+ messages in thread
From: Taufik Chowi @ 2008-09-11  9:33 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

Dear Andrew,

I see , umh , i am really sorry but i am very very new with gcj .. i know this is a stupid question. (yes i have read the gcj manual)
but how do i split the jar file ?
i mean do i have to do something like unjar the jar file?
i dont understand.. i know this is a silly question (at least i felt it will be a silly question :)) ) , if you dont feel like to answer this question than could you please point me to any website that has this information on compiling a splitted up jar file (i have tried googling, but i found nothing that is really helpful)

i have also tried reading gcj manual, but have i missed anything? O.o; (i mean if it exists in manual can you at least tell me which page / section? i dont seem to be able to find any answer)


again thanks a lot... :D


Cheers and God Bless,

Chowi



----- Original Message ----
From: Andrew Haley <aph@redhat.com>
To: Taufik Chowi <m4g1c14n2000@yahoo.com>
Sent: Thursday, September 11, 2008 4:24:55 PM
Subject: Re: GCJ Compile Error SQLite JDBC

Taufik Chowi wrote:
> Dear Andrew,
> 
> Before, thanks a lot for your help :)
> 
> i did the compile on 2 machines, i will try to list both of them , so you might have some clue of why the problem arised.
> 
> sqlitejdbc-v053.jar = 2.16 MB (2,268,596 bytes)

That's too big.  Split it up.

Andrew.



      

^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <333198.77200.qm@web54603.mail.re2.yahoo.com>]
* Re: GCJ Compile Error SQLite JDBC
@ 2008-09-11  9:22 Taufik Chowi
  0 siblings, 0 replies; 16+ messages in thread
From: Taufik Chowi @ 2008-09-11  9:22 UTC (permalink / raw)
  To: java

Dear Andrew,

Before, thanks a lot for your help :)

i did the compile on 2 machines, i will try to list both of them , so you might have some clue of why the problem arised.

sqlitejdbc-v053.jar = 2.16 MB (2,268,596 bytes)

SYSTEM A : OS Windows XP SP 2 
Processor Phenom 9500
My Physical Memory = 4GB DDR (1GB x 4)
My Virtual Memory (pagefile.sys) by windows is around 3.37 GB (3,623,071,744 bytes) 

SYSTEM B : OS Fedora Core 4
Processor Dual Opteron 
My Physical Memory = 4GB DDR (1GB x 4)

I am not sure how much is needed to compile a jar file, hopefuly i have enough to compile sqlitejdbc >.<
if you want you can download the sqlitejdbc file from this url http://files.zentus.com/sqlitejdbc/sqlitejdbc-v053.jar
it is pure java.

or
if you have any better sqlite jdbc , please let me know, or perhaps if
you have any other better embedded database except hsqldb and sqlite
please let me know (because both of them didnt compile well, and yes i
know it is because of my lack of knowledge)


Cheers and God Bless,

Chowi


      

^ permalink raw reply	[flat|nested] 16+ messages in thread
* GCJ Compile Error SQLite JDBC
@ 2008-09-11  6:28 Taufik Chowi
  2008-09-11  9:07 ` Andrew Haley
  0 siblings, 1 reply; 16+ messages in thread
From: Taufik Chowi @ 2008-09-11  6:28 UTC (permalink / raw)
  To: java

first thing first, sqlite works perfectly when i run my java code on JVM .
but i cant compile the sqlitejdbc jar files with gcj. why?

here is the command i use for compiling :
gcj -fjni -O2 -c sqlitejdbc-v053.jar -o sqlitejdbc-v053.jar.o

the command above will give an error :
jc1.exe: out of memory allocating 262144 bytes

please help >.< , am i missing something?

if i can get this to work, then i will use it instead of hsqldb , because my hsqldb also have some problem T.T
http://gcc.gnu.org/ml/java/2008-09/msg00020.html



Cheers and God Bless,

Chowi



      

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-09-24  3:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-11 11:05 GCJ Compile Error SQLite JDBC Taufik Chowi
2008-09-11 11:13 ` Andrew Haley
2008-09-23  9:24   ` Nektarios K. Papadopoulos
  -- strict thread matches above, loose matches on Subject: below --
2008-09-24  3:12 Taufik Chowi
2008-09-23 10:19 Taufik Chowi
2008-09-23 11:15 ` Nektarios K. Papadopoulos
2008-09-23  9:33 Taufik Chowi
2008-09-23 10:14 ` Marco Trudel
2008-09-11  9:55 Taufik Chowi
2008-09-11 10:51 ` Andrew Haley
2008-09-11  9:33 Taufik Chowi
2008-09-11  9:43 ` Andrew Haley
     [not found] <333198.77200.qm@web54603.mail.re2.yahoo.com>
2008-09-11  9:31 ` Andrew Haley
2008-09-11  9:22 Taufik Chowi
2008-09-11  6:28 Taufik Chowi
2008-09-11  9:07 ` Andrew Haley

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).