JRuby is a project to watch for. jrubyは、プロジェクトを監視します。 It implements Ruby on Java virtual machine.それを実装するRuby on Java仮想マシンです。 In other words now Ruby is truly cross-platform.言い換えれば今すぐルビーは、真にクロスプラットフォームです。 More importantly it allows strong inter-operability between java classes and ruby scripts.さらに重要なことができる強力なJavaクラスとの間に相互運用性のRubyスクリプトです。

JRuby jruby allows Ruby code to easily call Java classes and vice versa.ルビー色のコードを簡単に呼び出しにより、 Javaクラスと逆も可能です。 Invoking a java class from Ruby is as simple as:ルビーはJavaのクラスからの呼び出しは、簡単ですが:

 require 'java' include_class 'java.util.Random' r = Random.new puts r.nextInt必要な'ジャワ' include_class ' java.util.random ' random.newにより研究= r.nextint 

Key Differences 主な違い

  • JRuby uses Java threads instead of Ruby specific “green” threads. jrubyルビーの代わりに使用してJavaのスレッド固有の"緑"のスレッドです。
  • JRuby doesn’t guarantee that integers returned by Object#id are unique. jruby保証することはできませんから返されるオブジェクトの整数#番号は独特だ。

Limitations 制限

  • It hasn’t yet ported RoR to JRuby.移植していない状態RORをjrubyはまだありません。 It is slated for March 2006.これは2006年3月を予定しています。
  • Finalizers are not implemented.ファイナライザが実装されていない。
  • It is somewhat slower than native C implementation.これはネイティブのCでの実装よりもやや遅いです。
  • It cannot load ruby external modules (native shared libraries) .ルビー色の外部モジュールを読み込むことはできません(ネイティブ共有ライブラリ)です。