public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Compile java files in packages
@ 2009-06-05  7:39 Vaijayanthi Mala Suresh
       [not found] ` <c20f2990906050151t3152a3d6xeff18a9a7ecbb396@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Vaijayanthi Mala Suresh @ 2009-06-05  7:39 UTC (permalink / raw)
  To: java

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

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

* Re: Compile java files in packages
       [not found] ` <c20f2990906050151t3152a3d6xeff18a9a7ecbb396@mail.gmail.com>
@ 2009-06-05  8:56   ` jovansonlee cesar
  2009-06-05 10:40     ` Vaijayanthi Mala Suresh
  0 siblings, 1 reply; 7+ messages in thread
From: jovansonlee cesar @ 2009-06-05  8:56 UTC (permalink / raw)
  To: java

Hi Vaijayanthi Mala Suresh,

Here is my little example:
http://ivanceras.blogspot.com/2009/04/gcj-vs-jvm-benchmark.html

    $gcj -c -g -O Test.java
    $gcj --main=Test -o Test.bin Test.o
    $./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

  Compiling, Linking and Running in GCJ:

  compile the PostgreSQL jdbc driver
   $gcj -c -g -O postgresql-8.4dev-700.jdbc3.jar
   This will create the native binary file "postgresql-8.4dev-700.jdbc3.o"

  compile the Test
   $gcj -c -g -O TestDb.java
  This will create the native binay file "TestDb.o"

   do the linking
  $gcj --main=TestDb -o TestDb.bin postgresql-8.4dev-700.jdbc3.o TestDb.o
  This will create the executable file: "TestDb.bin"

  execute
  $./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
<vaijayanthimalas@gmail.com> 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

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

* Re: Compile java files in packages
  2009-06-05  8:56   ` jovansonlee cesar
@ 2009-06-05 10:40     ` Vaijayanthi Mala Suresh
  2009-06-05 10:56       ` jovansonlee cesar
  0 siblings, 1 reply; 7+ messages in thread
From: Vaijayanthi Mala Suresh @ 2009-06-05 10:40 UTC (permalink / raw)
  To: jovansonlee cesar; +Cc: java

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<ivanceras@gmail.com> wrote:
> Hi Vaijayanthi Mala Suresh,
>
> Here is my little example:
> http://ivanceras.blogspot.com/2009/04/gcj-vs-jvm-benchmark.html
>
>    $gcj -c -g -O Test.java
>    $gcj --main=Test -o Test.bin Test.o
>    $./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
>
>  Compiling, Linking and Running in GCJ:
>
>  compile the PostgreSQL jdbc driver
>   $gcj -c -g -O postgresql-8.4dev-700.jdbc3.jar
>   This will create the native binary file "postgresql-8.4dev-700.jdbc3.o"
>
>  compile the Test
>   $gcj -c -g -O TestDb.java
>  This will create the native binay file "TestDb.o"
>
>   do the linking
>  $gcj --main=TestDb -o TestDb.bin postgresql-8.4dev-700.jdbc3.o TestDb.o
>  This will create the executable file: "TestDb.bin"
>
>  execute
>  $./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
> <vaijayanthimalas@gmail.com> 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
>

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

* Re: Compile java files in packages
  2009-06-05 10:40     ` Vaijayanthi Mala Suresh
@ 2009-06-05 10:56       ` jovansonlee cesar
  2009-06-05 11:00         ` Vaijayanthi Mala Suresh
  0 siblings, 1 reply; 7+ messages in thread
From: jovansonlee cesar @ 2009-06-05 10:56 UTC (permalink / raw)
  To: java

Hello Vaijayanthi Mala Suresh,

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

I have not tried generating .h files for these, and I havent even
tried linking java together with c++,
My main objective is really just to compile prebuilt java applications
into native binary using gcj.

In generating ".class" files, you could use "gcj -C" in the same way
you use "javac" from sun's jdk,
"gij" in the same way you could use "java" from sun jdk,

Here is an example:
       $gcj -C Hello.java
that would generate Hello.class
in the same you do as(in suns jdk)
       $javac Hello.java

To run, just use
      $gij Hello
in the same(suns jdk)
     $java Hello


Regards,
ivanceras


On Fri, Jun 5, 2009 at 6:39 PM, Vaijayanthi Mala
Suresh<vaijayanthimalas@gmail.com> wrote:
> 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<ivanceras@gmail.com> wrote:
>> Hi Vaijayanthi Mala Suresh,
>>
>> Here is my little example:
>> http://ivanceras.blogspot.com/2009/04/gcj-vs-jvm-benchmark.html
>>
>>    $gcj -c -g -O Test.java
>>    $gcj --main=Test -o Test.bin Test.o
>>    $./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
>>
>>  Compiling, Linking and Running in GCJ:
>>
>>  compile the PostgreSQL jdbc driver
>>   $gcj -c -g -O postgresql-8.4dev-700.jdbc3.jar
>>   This will create the native binary file "postgresql-8.4dev-700.jdbc3.o"
>>
>>  compile the Test
>>   $gcj -c -g -O TestDb.java
>>  This will create the native binay file "TestDb.o"
>>
>>   do the linking
>>  $gcj --main=TestDb -o TestDb.bin postgresql-8.4dev-700.jdbc3.o TestDb.o
>>  This will create the executable file: "TestDb.bin"
>>
>>  execute
>>  $./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
>> <vaijayanthimalas@gmail.com> 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
>>
>

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

* Re: Compile java files in packages
  2009-06-05 10:56       ` jovansonlee cesar
@ 2009-06-05 11:00         ` Vaijayanthi Mala Suresh
  2009-06-05 11:05           ` jovansonlee cesar
  0 siblings, 1 reply; 7+ messages in thread
From: Vaijayanthi Mala Suresh @ 2009-06-05 11:00 UTC (permalink / raw)
  To: jovansonlee cesar; +Cc: java

Hi ivanceras,

Can you please let me know how to do it for java files within packages.

For eg. I have mytest.java under com.test.

if i give gcj -c ./com/test/mytest.java it gives me error.

Thanks
Mala

On Fri, Jun 5, 2009 at 4:26 PM, jovansonlee cesar<ivanceras@gmail.com> wrote:
> Hello Vaijayanthi Mala Suresh,
>
>> 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.
>
> I have not tried generating .h files for these, and I havent even
> tried linking java together with c++,
> My main objective is really just to compile prebuilt java applications
> into native binary using gcj.
>
> In generating ".class" files, you could use "gcj -C" in the same way
> you use "javac" from sun's jdk,
> "gij" in the same way you could use "java" from sun jdk,
>
> Here is an example:
>       $gcj -C Hello.java
> that would generate Hello.class
> in the same you do as(in suns jdk)
>       $javac Hello.java
>
> To run, just use
>      $gij Hello
> in the same(suns jdk)
>     $java Hello
>
>
> Regards,
> ivanceras
>
>
> On Fri, Jun 5, 2009 at 6:39 PM, Vaijayanthi Mala
> Suresh<vaijayanthimalas@gmail.com> wrote:
>> 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<ivanceras@gmail.com> wrote:
>>> Hi Vaijayanthi Mala Suresh,
>>>
>>> Here is my little example:
>>> http://ivanceras.blogspot.com/2009/04/gcj-vs-jvm-benchmark.html
>>>
>>>    $gcj -c -g -O Test.java
>>>    $gcj --main=Test -o Test.bin Test.o
>>>    $./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
>>>
>>>  Compiling, Linking and Running in GCJ:
>>>
>>>  compile the PostgreSQL jdbc driver
>>>   $gcj -c -g -O postgresql-8.4dev-700.jdbc3.jar
>>>   This will create the native binary file "postgresql-8.4dev-700.jdbc3.o"
>>>
>>>  compile the Test
>>>   $gcj -c -g -O TestDb.java
>>>  This will create the native binay file "TestDb.o"
>>>
>>>   do the linking
>>>  $gcj --main=TestDb -o TestDb.bin postgresql-8.4dev-700.jdbc3.o TestDb.o
>>>  This will create the executable file: "TestDb.bin"
>>>
>>>  execute
>>>  $./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
>>> <vaijayanthimalas@gmail.com> 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
>>>
>>
>

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

* Re: Compile java files in packages
  2009-06-05 11:00         ` Vaijayanthi Mala Suresh
@ 2009-06-05 11:05           ` jovansonlee cesar
       [not found]             ` <6f1633170906050417r11d29691p8bb1be0e80907b13@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: jovansonlee cesar @ 2009-06-05 11:05 UTC (permalink / raw)
  To: Vaijayanthi Mala Suresh; +Cc: java

Hi Vaijayanthi Mala Suresh,

> if i give gcj -c ./com/test/mytest.java it gives me error.

It should be Capital "-C"
try it with
gcj -C ./com/test/mytest.java

Regards,
ivanceras






On Fri, Jun 5, 2009 at 7:00 PM, Vaijayanthi Mala
Suresh<vaijayanthimalas@gmail.com> wrote:
> Hi ivanceras,
>
> Can you please let me know how to do it for java files within packages.
>
> For eg. I have mytest.java under com.test.
>
> if i give gcj -c ./com/test/mytest.java it gives me error.
>
> Thanks
> Mala
>
> On Fri, Jun 5, 2009 at 4:26 PM, jovansonlee cesar<ivanceras@gmail.com> wrote:
>> Hello Vaijayanthi Mala Suresh,
>>
>>> 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.
>>
>> I have not tried generating .h files for these, and I havent even
>> tried linking java together with c++,
>> My main objective is really just to compile prebuilt java applications
>> into native binary using gcj.
>>
>> In generating ".class" files, you could use "gcj -C" in the same way
>> you use "javac" from sun's jdk,
>> "gij" in the same way you could use "java" from sun jdk,
>>
>> Here is an example:
>>       $gcj -C Hello.java
>> that would generate Hello.class
>> in the same you do as(in suns jdk)
>>       $javac Hello.java
>>
>> To run, just use
>>      $gij Hello
>> in the same(suns jdk)
>>     $java Hello
>>
>>
>> Regards,
>> ivanceras
>>
>>
>> On Fri, Jun 5, 2009 at 6:39 PM, Vaijayanthi Mala
>> Suresh<vaijayanthimalas@gmail.com> wrote:
>>> 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<ivanceras@gmail.com> wrote:
>>>> Hi Vaijayanthi Mala Suresh,
>>>>
>>>> Here is my little example:
>>>> http://ivanceras.blogspot.com/2009/04/gcj-vs-jvm-benchmark.html
>>>>
>>>>    $gcj -c -g -O Test.java
>>>>    $gcj --main=Test -o Test.bin Test.o
>>>>    $./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
>>>>
>>>>  Compiling, Linking and Running in GCJ:
>>>>
>>>>  compile the PostgreSQL jdbc driver
>>>>   $gcj -c -g -O postgresql-8.4dev-700.jdbc3.jar
>>>>   This will create the native binary file "postgresql-8.4dev-700.jdbc3.o"
>>>>
>>>>  compile the Test
>>>>   $gcj -c -g -O TestDb.java
>>>>  This will create the native binay file "TestDb.o"
>>>>
>>>>   do the linking
>>>>  $gcj --main=TestDb -o TestDb.bin postgresql-8.4dev-700.jdbc3.o TestDb.o
>>>>  This will create the executable file: "TestDb.bin"
>>>>
>>>>  execute
>>>>  $./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
>>>> <vaijayanthimalas@gmail.com> 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
>>>>
>>>
>>
>

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

* Re: Compile java files in packages
       [not found]             ` <6f1633170906050417r11d29691p8bb1be0e80907b13@mail.gmail.com>
@ 2009-06-05 11:26               ` jovansonlee cesar
  0 siblings, 0 replies; 7+ messages in thread
From: jovansonlee cesar @ 2009-06-05 11:26 UTC (permalink / raw)
  To: Vaijayanthi Mala Suresh; +Cc: java

Hi Vaijayanthi Mala Suresh,

Nope, sorry I cant. I haven't use "make" yet. And this maybe the next
step I have to learn.
What I  was just doing lately was to compile files by individually,
since I am involved with relatively small number of files.
If you will be able make one, Please share me  some samples.

Regards,
ivanceras

On Fri, Jun 5, 2009 at 7:17 PM, Vaijayanthi Mala
Suresh<vaijayanthimalas@gmail.com> wrote:
> Hi ivanceras
>
> Thanks.
>
> It is not working for me unless i give --classpath=com.
>
> Can you give me a sample make file
>     to convert all the java files in multiple hierarchy packages to .o files
>     to convert all the java files into multiple hierarchy packages
> to .class files
>
> Thanks
> Mala
>
> On Fri, Jun 5, 2009 at 4:35 PM, jovansonlee cesar<ivanceras@gmail.com> wrote:
>> Hi Vaijayanthi Mala Suresh,
>>
>>> if i give gcj -c ./com/test/mytest.java it gives me error.
>>
>> It should be Capital "-C"
>> try it with
>> gcj -C ./com/test/mytest.java
>>
>> Regards,
>> ivanceras
>>
>>
>>
>>
>>
>>
>> On Fri, Jun 5, 2009 at 7:00 PM, Vaijayanthi Mala
>> Suresh<vaijayanthimalas@gmail.com> wrote:
>>> Hi ivanceras,
>>>
>>> Can you please let me know how to do it for java files within packages.
>>>
>>> For eg. I have mytest.java under com.test.
>>>
>>> if i give gcj -c ./com/test/mytest.java it gives me error.
>>>
>>> Thanks
>>> Mala
>>>
>>> On Fri, Jun 5, 2009 at 4:26 PM, jovansonlee cesar<ivanceras@gmail.com> wrote:
>>>> Hello Vaijayanthi Mala Suresh,
>>>>
>>>>> 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.
>>>>
>>>> I have not tried generating .h files for these, and I havent even
>>>> tried linking java together with c++,
>>>> My main objective is really just to compile prebuilt java applications
>>>> into native binary using gcj.
>>>>
>>>> In generating ".class" files, you could use "gcj -C" in the same way
>>>> you use "javac" from sun's jdk,
>>>> "gij" in the same way you could use "java" from sun jdk,
>>>>
>>>> Here is an example:
>>>>       $gcj -C Hello.java
>>>> that would generate Hello.class
>>>> in the same you do as(in suns jdk)
>>>>       $javac Hello.java
>>>>
>>>> To run, just use
>>>>      $gij Hello
>>>> in the same(suns jdk)
>>>>     $java Hello
>>>>
>>>>
>>>> Regards,
>>>> ivanceras
>>>>
>>>>
>>>> On Fri, Jun 5, 2009 at 6:39 PM, Vaijayanthi Mala
>>>> Suresh<vaijayanthimalas@gmail.com> wrote:
>>>>> 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<ivanceras@gmail.com> wrote:
>>>>>> Hi Vaijayanthi Mala Suresh,
>>>>>>
>>>>>> Here is my little example:
>>>>>> http://ivanceras.blogspot.com/2009/04/gcj-vs-jvm-benchmark.html
>>>>>>
>>>>>>    $gcj -c -g -O Test.java
>>>>>>    $gcj --main=Test -o Test.bin Test.o
>>>>>>    $./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
>>>>>>
>>>>>>  Compiling, Linking and Running in GCJ:
>>>>>>
>>>>>>  compile the PostgreSQL jdbc driver
>>>>>>   $gcj -c -g -O postgresql-8.4dev-700.jdbc3.jar
>>>>>>   This will create the native binary file "postgresql-8.4dev-700.jdbc3.o"
>>>>>>
>>>>>>  compile the Test
>>>>>>   $gcj -c -g -O TestDb.java
>>>>>>  This will create the native binay file "TestDb.o"
>>>>>>
>>>>>>   do the linking
>>>>>>  $gcj --main=TestDb -o TestDb.bin postgresql-8.4dev-700.jdbc3.o TestDb.o
>>>>>>  This will create the executable file: "TestDb.bin"
>>>>>>
>>>>>>  execute
>>>>>>  $./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
>>>>>> <vaijayanthimalas@gmail.com> 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
>>>>>>
>>>>>
>>>>
>>>
>>
>

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

end of thread, other threads:[~2009-06-05 11:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05  7:39 Compile java files in packages Vaijayanthi Mala Suresh
     [not found] ` <c20f2990906050151t3152a3d6xeff18a9a7ecbb396@mail.gmail.com>
2009-06-05  8:56   ` jovansonlee cesar
2009-06-05 10:40     ` Vaijayanthi Mala Suresh
2009-06-05 10:56       ` jovansonlee cesar
2009-06-05 11:00         ` Vaijayanthi Mala Suresh
2009-06-05 11:05           ` jovansonlee cesar
     [not found]             ` <6f1633170906050417r11d29691p8bb1be0e80907b13@mail.gmail.com>
2009-06-05 11:26               ` jovansonlee cesar

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