| Preface | p. vii |
| Getting Started | p. 1 |
| Installing JRuby | p. 4 |
| Managing Packages with RubyGems | p. 8 |
| Using Both Ruby and JRuby | p. 9 |
| Sharing RubyGems | p. 11 |
| Referencing Java Classes from Ruby | p. 12 |
| Converting a Ruby Array into a Java Array | p. 15 |
| Adding JAR Files to the Classpath | p. 16 |
| Extending a Java Class in Ruby | p. 17 |
| Implementing a Java Interface in Ruby | p. 18 |
| Opening Java Classes with JRuby | p. 22 |
| Setting Up Eclipse for JRuby Development | p. 24 |
| Setting Up NetBeans for JRuby Development | p. 28 |
| Platform Detection in a JRuby Application | p. 31 |
| JRuby on Rails | p. 33 |
| Installing and Setting Up Rails | p. 34 |
| Packaging Rails As a Java EE Web Application | p. 37 |
| Using an External Gem Repository with a Web Application | p. 39 |
| Configuring the JRuby-Rack Servlet | p. 39 |
| Packaging Rails with a JNDI DataSource | p. 41 |
| Deploying Rails on Tomcat | p. 42 |
| Deploying Rails on JBoss | p. 44 |
| Deploying Rails on Jetty | p. 46 |
| Deploying Rails with jetty_rails | p. 47 |
| Deploying Rails with Mongrel | p. 49 |
| Deploying Rails on the GlassFish v2 Server | p. 51 |
| Using the GlassFish v3 Gem | p. 52 |
| Using ActiveRecord Outside of Rails | p. 53 |
| Accessing Common Java Servlet Information | p. 55 |
| Configuring Session Storage | p. 56 |
| Controlling the Classes, Directories, and Other Files Packaged into a Rails WAR File | p. 57 |
| Changing the Name of the WAR File and the Staging Area | p. 58 |
| Deploying a Rails Application to the Root Context | p. 58 |
| Creating a Rails Application with Aptana Studio | p. 60 |
| Accessing Static Files in Your Rails Java EE Application | p. 63 |
| Java Integration | p. 65 |
| Executing Ruby from Java | p. 66 |
| Invoking JRuby Through the Bean Scripting Framework | p. 70 |
| Invoking JRuby Through Java Scripting Support | p. 72 |
| Logging from Ruby with Jakarta Commons Logging | p. 75 |
| Using the Java Concurrency Utilities | p. 77 |
| Creating JavaBean Style Accessor Methods | p. 79 |
| Writing Consistent Code | p. 80 |
| Transforming XML with TrAX | p. 80 |
| Creating a Pool of JRuby Runtimes | p. 82 |
| Performing Remote Management with JMX | p. 84 |
| Accessing Native Libraries with JRuby | p. 86 |
| Enterprise Java | p. 89 |
| Creating a JNDI Context | p. 90 |
| Sending JMS Messages | p. 92 |
| Receiving JMS Messages | p. 95 |
| Implementing an Enterprise JavaBean with JRuby | p. 96 |
| Defining Spring Beans in JRuby | p. 100 |
| Creating Refreshable JRuby Spring Beans | p. 103 |
| Defining JRuby Spring Beans Inline | p. 106 |
| Applying Spring-Aware Interfaces to JRuby Objects | p. 107 |
| Creating Spring MVC Controllers with JRuby | p. 110 |
| Using Hibernate with JRuby | p. 113 |
| Using the Java Persistence API with JRuby | p. 115 |
| Making SOAP Calls | p. 116 |
| Simplifying LDAP Access | p. 118 |
| User Interface and Graphics | p. 121 |
| Creating Swing Applications | p. 122 |
| Swing Event Handling | p. 123 |
| Long-Running Tasks in Swing Applications | p. 124 |
| Packaging Standalone Applications | p. 126 |
| Packaging JRuby Web Start Applications | p. 128 |
| Creating JRuby Applets | p. 130 |
| Manipulating Images | p. 133 |
| Creating SWT Applications | p. 136 |
| Accessing the Native Desktop | p. 138 |
| Accessing the System Tray | p. 139 |
| Swing Development with JRuby Domain-Specific Languages | p. 141 |
| Using the Monkeybars Framework for Swing Development | p. 144 |
| Creating Qt Applications with JRuby | p. 148 |
| Build Tools | p. 153 |
| Adding Ruby Scripting to Ant Builds | p. 154 |
| Using Ruby in Ant Conditions | p. 156 |
| Writing an Ant Task in Ruby | p. 158 |
| Adding Ruby Scripting to Maven Builds | p. 158 |
| Writing a Maven Plugin with JRuby | p. 161 |
| Building Java Projects with Raven | p. 164 |
| Referencing Libraries with Raven | p. 165 |
| Hosting a Private Raven Repository | p. 166 |
| Running JUnit Tests with Raven | p. 167 |
| Building Java Projects with Buildr | p. 168 |
| Referencing Libraries with Buildr | p. 171 |
| Building with Rake Inside Hudson | p. 172 |
| Adding Ruby Script to a Hudson Job | p. 173 |
| Testing | p. 175 |
| Unit Testing Java Code with Test/Unit | p. 176 |
| Unit Testing Java Code with dust | p. 178 |
| Unit Testing Java Code with Expectations | p. 179 |
| Testing Java Code with RSpec | p. 181 |
| Creating Mock Objects with Mocha | p. 185 |
| Modifying the JtestR Classpath | p. 187 |
| Grouping Tests for JtestR | p. 188 |
| Using the JtestR Command-Line Options | p. 188 |
| Running JtestR with Ant | p. 190 |
| Running JtestR with Maven | p. 190 |
| Improving JtestR Performance | p. 192 |
| The JRuby Community | p. 195 |
| Building JRuby from Source | p. 195 |
| Submitting an Issue Report for JRuby | p. 196 |
| Using the JRuby Mailing Lists | p. 198 |
| Index | p. 199 |
| Table of Contents provided by Ingram. All Rights Reserved. |