small medium large xlarge

Using JRuby: Bringing Ruby to Java


Cover image for Using JRuby

Using JRuby

Bringing Ruby to Java


Now you can bring the best of Ruby into the world of Java, with Using JRuby. Come to the source for the JRuby core team’s insights and insider tips. You’ll learn how to call Java objects seamlessly from Ruby, and deal with Java idioms such as interfaces and overloaded functions. Run Ruby code from Java, and make a Java program scriptable in Ruby. See how to compile Ruby into .class files that are callable from Java, Scala, Clojure, or any other JVM language.

About this Title

Pages: 300
Published: 2011-01-28
Release: P1.0 (2011-01-26)
ISBN: 978-1-93435-665-4

In Using JRuby you’ll venture into the wide world of open-source Ruby and Java libraries. Write Ruby on Rails web applications that run on Java servers like Tomcat. Use Java’s JDBC or Hibernate to easily connect Ruby to industry-standard databases. Test your Java program using Ruby’s elegant Cucumber and RSpec frameworks. Create dazzling desktop user interfaces with frameworks like Limelight and Monkeybars. Package a Rails or plain Ruby project for easy deployment to any Java environment.

JRuby lets you merge the best of several possible worlds, so you can create unique software using the best tools available. This book is your definitive guide.

Read the reviews .

What You Need

JRuby 1.7.4

Contents & Extracts

Full Table of Contents

  • JRuby Core
    • Getting to Know JRuby
    • Driving Java from Ruby excerpt
    • Ruby from Java: Embedding JRuby excerpt
    • The JRuby Compiler
  • JRuby and the World
    • Introduction to Rails excerpt
    • JRuby and Relational Databases
    • Building Software for Deployment
    • Testing Your Code with JRuby
    • Beyond Unit Tests
    • Building GUIs with Swing
  • Reference
    • Ruby 101
    • Ruby/Java Interoperability
    • Configuring JRuby
    • Calling External C Code
    • JRuby for Sysadmins
    • Limelight Example Source
    • Bibliography


Charles Nutter and Thomas Enebo co-lead the JRuby project.

Nick Sieger is a core contributor to JRuby and many other libraries.

Ola Bini writes software at ThoughtWorks.

Ian Dees is the author of Scripted GUI Testing With Ruby.