# Compiling Ruby through JRuby?

**URL:** <https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453>\
**Category:** Ruby\
**Created:** [July 30, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453 "2010-07-30T14:29:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrZombie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@MrZombie](https://www.ruby-forum.com/u/MrZombie)\
**Post date:** [July 30, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453/1 "2010-07-30T14:29:43Z")

</div>

Hi! I’m currently building a program which will be mostly standalone,  
and use little libraries, if at all.

If I want to use the project as a library within a Java program, would  
it be possible to compile it through JRuby?

---

<div class="post-metadata">

**Author:** ![MrZombie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@MrZombie](https://www.ruby-forum.com/u/MrZombie)\
**Post date:** [July 31, 2010, 1:26pm UTC](https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453/2 "2010-07-31T13:26:32Z")

</div>

MrZombie wrote:

> Hi! I’m currently building a program which will be mostly standalone,  
> and use little libraries, if at all.
> 
> If I want to use the project as a library within a Java program, would  
> it be possible to compile it through JRuby?

Probably.

> **[Home — JRuby.org](https://www.jruby.org)**
>
> JRuby is a high performance, stable, fully threaded Java implementation of the Ruby programming language.

-r

---

<div class="post-metadata">

**Author:** ![MrZombie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@MrZombie](https://www.ruby-forum.com/u/MrZombie)\
**Post date:** [July 31, 2010, 3:15pm UTC](https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453/3 "2010-07-31T15:15:54Z")

</div>

Roger P. wrote:

> MrZombie wrote:
> 
> > Hi! I’m currently building a program which will be mostly standalone,  
> > and use little libraries, if at all.
> > 
> > If I want to use the project as a library within a Java program, would  
> > it be possible to compile it through JRuby?
> 
> Probably.  
> [jruby.org](http://jruby.org)

See also  
[http://wiki.github.com/rdp/ruby\_tutorials\_core/ruby-talk-faq#ruby\_to\_exe](http://wiki.github.com/rdp/ruby_tutorials_core/ruby-talk-faq#ruby_to_exe)

and

> **[mirah.org](http://ww38.mirah.org/)**
>
> This domain may be for sale!

GL!  
-r

---

<div class="post-metadata">

**Author:** ![MrZombie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@MrZombie](https://www.ruby-forum.com/u/MrZombie)\
**Post date:** [August 4, 2010, 6:53am UTC](https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453/4 "2010-08-04T06:53:04Z")

</div>

In JRuby 1.5, we introduced a feature to the jrubyc compiler to  
produce a “normal” Java class from Ruby code. Check out this wiki  
page:

[http://kenai.com/projects/jruby/pages/GeneratingJavaClasses](http://kenai.com/projects/jruby/pages/GeneratingJavaClasses)
