# Converting java bytecode to machine code???

**URL:** <https://community.unix.com/t/converting-java-bytecode-to-machine-code/308309>\
**Category:** Programming\
**Created:** [April 13, 2012, 9:12am UTC](https://community.unix.com/t/converting-java-bytecode-to-machine-code/308309 "2012-04-13T09:12:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabam](https://community.unix.com/letter_avatar/gabam/32/6_449c533f586939b6e5f246632a46421f.png) [@gabam](https://community.unix.com/u/gabam)\
**Post date:** [April 13, 2012, 9:12am UTC](https://community.unix.com/t/converting-java-bytecode-to-machine-code/308309/1 "2012-04-13T09:12:08Z")

</div>

Hi friends,  
I hope you are fine and doing well. Java compiles its source code into an intermediary form called the bytecode, which has to be interpreted into machine code by the JVM. My question is, is it possible to produce machine code from java source code? For example, suppose I write the hello world program in java and compile it, normally i would have to use the jre to interpet the created class file. Is it possible to convert this hello world java source code directly into an executable form, so that I can execute that program without any kind of interpreter. I have heard about GCJ that it converts java source code or bytecode into machine code, does it really do so? I will really appreciate your wonderful replies.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![bogdanp9](https://community.unix.com/user_avatar/community.unix.com/bogdanp9/32/7920_2.png) [@bogdanp9](https://community.unix.com/u/bogdanp9)\
**Post date:** [April 13, 2012, 9:45am UTC](https://community.unix.com/t/converting-java-bytecode-to-machine-code/308309/2 "2012-04-13T09:45:56Z")

</div>

gcj should do the job.
