This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about GCJ


Harmanpaul S Gill wrote:
> Hello Ranjit,
>     Thanks for replying to my email. As for the last
> question I meant to ask if suppose I write a java
> source code for calculating square root of a number
> and  I do "ahead of time" compiling using GCJ to
> native machine code, will the application launch
> itself or do I have explicity use a utility to run it

I am still a bit confused by this question, but if
you simply mean if one has to do any voodoo to
run a GCJ compiled application, then the answer
is "No, not beyond what you need for 'normal' applications.".

E.g.:

    $ gcj --main=MySqrt MySqrt.java -o mysqrt
    $ mysqrt
    <whatever is the output>

If libgcj is dynamically linked into your application
(the default on most systems, including Linux), you
need to ensure that "libgcj.so" is loadable by the
dynamic loader. If it is statically linked in (as in
Win32 by default), you do not need to do anything
else.


> ? If you have time could you enlist some major
> motivations for GCJ project, I will really appreciate
> your response.

See the last section of:

    http://gcc.gnu.org/java/docs.html

Also:

    http://h21007.www2.hp.com/dspp/files/unprotected/gcj2.pdf

HTH.

Ranjit.


> --- Ranjit Mathew <rmathew@hotmail.com> wrote:
> 
>>Harmanpaul S Gill wrote:
>>
>>>Hello Sir/Madam,
>>>
>>>I wanted to request the following information
>>
>>about
>>
>>>GCJ project which I couldn't find online , please
>>>provide me a link or contact of a person who can
>>
>>help
>>
>>>me.
>>
>>Use the GCJ mailing list: java@gcc.gnu.org
>>
>>
>>
>>>1. How is concurrency achieved in GCJ?
>>
>>The runtime library maps threads to the
>>host OS's threading facilities. For example,
>>on Win32 it uses Win32 threads while on
>>Linux it uses POSIX threads.
>>
>>
>>
>>>2. How is the decison made on accepting a
>>>contribution/code? 
>>
>>Trivial/small contributions are accepted
>>if they look OK without much of a hassle. For
>>significant/large changes, you need to assign
>>copyrights for your contributions to FSF
>>via signed assignment papers (dead-tree format
>>sent via snail-mail).
>>
>>
>>
>>>3. Is the conversion of Java source code to native
>>>machine  code with GCJ equal to running it?
>>
>>What does this mean? Can you elaborate or
>>rephrase this?
>>
>>Ranjit.
>>
>>-- 
>>Ranjit Mathew          Email: rmathew AT hotmail DOT
>>com
>>
>>Bangalore, INDIA.      Web:
>>http://ranjitmathew.tripod.com/
>>
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> 


-- 
Ranjit Mathew          Email: rmathew AT hotmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]