code to run side-by-side, as well as decompilation to reoptimize and outputting generated bytecode as Java class files. Frameworks support JRuby has built-in support for Rails, RSpec, Rake, and RubyGems. It embeds an FFI subsystem to allow the use of C libraries bundled as gems. It also allows launching the Interactive Ruby Shell (irb) as Ruby MRI does. The Netbeans Ruby Pack, available in NetBeans 6, allows IDE development with Ruby and JRuby, as well as Ruby on Rails for the two implementations of Ruby. It is no longer included in NetBeans 7.0 and later. Programming Ruby meets Java JRuby is similar to the standard Ruby interpreter except written in Java. JRuby features some of the same concepts, including object-oriented programming, and dynamic typing as Ruby. The key difference is that JRuby is tightly integrated with Java, and can be called directly from Java programs. Java has significant footing in the development of web applications. JRuby calling Java One powerful feature of JRuby is its ability to invoke the classes of the Java Platform. To do this, one must first load JRuby's Java support, by calling "require 'java'". The following example creates a Java JFrame with a JLabel: require 'java' frame = javax.swing.JFrame.new frame.getContentPane.add javax.swing.JLabel.new('Hello, World!') frame.setDefaultCloseOperation javax.swing.JFrame::EXIT_ON_CLOSE frame.pack frame.set_visible true JRuby also allows the user to call Java code using the more Ruby-like underscore method naming and to refer to JavaBean properties as attributes: frame.content_pane.add label frame.visible = true Calling JRuby from Java JRuby can just as easily be called from Java, using either the JSR 223 Scripting for Java 6 or the Apache Bean Scripting framework. //Example using JSR 233 Scripting for Java 6 ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine rbEngine = mgr.getEngineByExtension("rb"); try { rbEngine.eval("puts 'Hello World!'"); } catch (ScriptException ex) { ex.printStackTrace(); } Performance According to some benchmarks, JRuby is faster than alternatives. Since implementations vary in how much code is loaded before execution, different methods of measuring speed can lead to biased interpretations of performance advantages. The time it takes for a Java Virtual Machine itself to load is often excluded from execution times when calculating benchmarks. JRuby has the significant architectural advantage to be able to leverage JVM threads without being constrained by a global interpreter lock (similarly to Rubinius), therefore achieving full parallelism within a process, which Ruby MRI cannot achieve despite leveraging OS threads. In a real Mongrel web server application tested