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.

Customer Reviews

This book is an excellent resource for JRuby and will without a doubt facilitate JRuby adoption in Java-centric enterprises.

- Bharat Ruparel

Senior information architect, America's Test Kitchen

This book makes a compelling case for JRuby. A must-have to bring some Ruby goodness to your Java powerhouse.

- Fred Daoud

Author, "Stripes...and Java Web Development Is Fun Again," and "Getting Started with Apache Click"

This is one of those books that you don’t want to put down and you can’t wait to get back to. For a technical publication, that is extremely rare. After reading this book, I can say I have a very good understanding of what JRuby is, how it interacts with Java, and a working knowledge of many of the supporting tools to accomplish a wide range of tasks. The way this book is organized, it makes a great reference for future development.

- Gale Straney

Senior software design engineer, Tektronix

This book will open the eyes of any Java programmer who wants to take their art to the next level. Read it.

- Geoff Drake

Owner, Managed Design

I really liked the clear structure of the book and all the covered libraries/dependencies (like Rake, Ant, Maven, testing frameworks). This clearly outlines the whole JRuby universe so that new users will immediately see what’s available and how to start using it.

- Vladimir Sizikov

Senior Engineer, Oracle

My JRuby apps will go live in two weeks. Without your book and the Ruby community, I would never have gotten this far.

- Pinit Asavanuchit

, Intersol Consulting Co., Ltd.

I was floored by the amount of technical detail the authors managed to cram in here! And they did it with such an approachable and readable tone that this book was both easy and fun to read. I can’t remember
the last technical book that did that for me. The breadth of coverage is astounding, too.

- Kent R. Spillner

I was very happy to discover the JRuby project, my favorite programming language running on what’s probably the best virtual machine in the world. This book really covers every in and out of this fantastic project.

- Peter Lind

Technical Consultant, Valtech

See All 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.