JRuby is a project to watch for. JRuby è un progetto per guardare. It implements Ruby on Java virtual machine. Essa svolte Ruby on Java virtual machine. In other words now Ruby is truly cross-platform. In altre parole ora il rubino è veramente multipiattaforma. More importantly it allows strong inter-operability between java classes and ruby scripts. Ancora più importante che consente una forte inter-operabilità tra classi java script e rubino.

JRuby allows Ruby code to easily call Java classes and vice versa. Ruby codice consente di chiamare facilmente le classi Java e viceversa. Invoking a java class from Ruby is as simple as: Invocando classe java da Ruby è semplice come:

 require 'java' include_class 'java.util.Random' r = Random.new puts r.nextInt richiedono 'java' include_class' java.util.Random 'r = Random.new mette r.nextInt 

Key Differences Le differenze chiave

  • JRuby uses Java threads instead of Ruby specific "green" threads. JRuby utilizza Java fili invece di Ruby specifici "verde" thread.
  • JRuby doesn't guarantee that integers returned by Object#id are unique. JRuby non garantisce che interi restituito da Object # id sono unici.

Limitations Limitazioni

  • It hasn't yet ported RoR to JRuby. Non ha ancora portato a RoR JRuby. It is slated for March 2006. E 'previsto per il mese di marzo 2006.
  • Finalizers are not implemented. Finalizers non sono attuate.
  • It is somewhat slower than native C implementation. È un po 'più lento di quello nativo C attuazione.
  • It cannot load ruby external modules (native shared libraries) . Essa non può rubino carico moduli esterni (librerie condivise native).