From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28129 invoked by alias); 5 Jun 2009 10:40:10 -0000 Received: (qmail 28119 invoked by uid 22791); 5 Jun 2009 10:40:09 -0000 X-SWARE-Spam-Status: No, hits=2.5 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_42,J_CHICKENPOX_44,J_CHICKENPOX_64,SARE_MSGID_LONG40,SPF_PASS,URI_BLOGSPOT X-Spam-Check-By: sourceware.org Received: from qw-out-1920.google.com (HELO qw-out-1920.google.com) (74.125.92.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Jun 2009 10:40:01 +0000 Received: by qw-out-1920.google.com with SMTP id 4so843392qwk.14 for ; Fri, 05 Jun 2009 03:39:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.46.15 with SMTP id h15mr2215747vcf.107.1244198398839; Fri, 05 Jun 2009 03:39:58 -0700 (PDT) In-Reply-To: References: <6f1633170906050039w19a0b975g992e8de2f5069b37@mail.gmail.com> Date: Fri, 05 Jun 2009 10:40:00 -0000 Message-ID: <6f1633170906050339q48335a14k70fba9b0f8212aa6@mail.gmail.com> Subject: Re: Compile java files in packages From: Vaijayanthi Mala Suresh To: jovansonlee cesar Cc: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00012.txt.bz2 Hi ivanceras, Thanks for your help. Can you please let me know i can generate .class files as I have native methods defined in many of these java files for which I need to generate the .h files as well. Thanks Mala On Fri, Jun 5, 2009 at 2:26 PM, jovansonlee cesar wrot= e: > Hi Vaijayanthi Mala Suresh, > > Here is my little example: > http://ivanceras.blogspot.com/2009/04/gcj-vs-jvm-benchmark.html > > =A0 =A0$gcj -c -g -O Test.java > =A0 =A0$gcj --main=3DTest -o Test.bin Test.o > =A0 =A0$./Test.bin > > and here's how you would compile jar library file(ie. postgresql jdbc > driver) and link it to your main class > http://ivanceras.blogspot.com/2009/05/gcc-vs-jvm-benchmark-2.html > > =A0Compiling, Linking and Running in GCJ: > > =A0compile the PostgreSQL jdbc driver > =A0 $gcj -c -g -O postgresql-8.4dev-700.jdbc3.jar > =A0 This will create the native binary file "postgresql-8.4dev-700.jdbc3.= o" > > =A0compile the Test > =A0 $gcj -c -g -O TestDb.java > =A0This will create the native binay file "TestDb.o" > > =A0 do the linking > =A0$gcj --main=3DTestDb -o TestDb.bin postgresql-8.4dev-700.jdbc3.o TestD= b.o > =A0This will create the executable file: "TestDb.bin" > > =A0execute > =A0$./TestDb.bin > > Please visit the blog for more details :) > > Regards, > ivanceras > > (PS: have to resend, mailist don't seem to accept html text) > > On Fri, Jun 5, 2009 at 3:39 PM, Vaijayanthi Mala Suresh > wrote: >> >> Hi, >> >> I have a several packages of java files which I need to compile with >> gcj to generate .class and .o files. >> >> Can anyone help me please. >> >> Thanks >> Mala >