JRuby upgrade features Java accommodations

Version 1.5 of the JVM-based language variant also integrates with build tools

JRuby 1.5, an upgrade to the Ruby language variant that runs on the Java Virtual Machine, will be made available Wednesday, featuring better accommodations for Java and build tools and improved Windows support.

The release, available at JRuby.org, has undergone 1,300 revisions and fixes 432 reported bugs. "It's probably our largest release ever, the most of work has gone into it," said Charles Nutter, JRuby architect at Engine Yard and a leader of the JRuby project along with Engine Yard colleague Thomas Enebo.

[ InfoWorld's Paul Krill reported on how languages like JRuby and Scala are becoming popular as alternatives to Java atop the JVM. ]

The Ruby language overall offers benefits over Java in that developers can perform tasks quicker, he said. Applications have been built with the open source JRuby language, including retail Websites and an airline refueling application, said Nutter.

"This is our first release really focusing on integrating well with the rest of the Java ecosystem," he said.

Ruby code in JRuby 1.5 can be turned into Java classes for capabilities like implementing a Web service. "Lots of Java libraries really need to have regular Java classes that they can use. Now it's possible to write those in Ruby using JRuby," Nutter said.

Tighter Java library integration translates to more efficient memory and CPU usage as well as faster development cycles, Engine Yard said.

With version 1.5, developers can use both the Rake and Ant build tools via an integration between the tools; developers can use either tool or mix and match them in the same project. Rake is a Ruby-focused tool, while Ant is for Java. The format of Ant build files is cumbersome for Java developers, but they now can use Rake while still utilizing Ant utilities, Nutter said.

Many bug fixes in JRuby 1.5 benefit JRuby deployments on the Windows platform, Enebo said. "As you know, most Java developers are Windows users," said Enebo. Also, JRuby's developers spent time improving performance of Java code in version 1.5.

Version 1.5 offers high compliance with the Ruby specification test suite, Nutter said.

"Ruby developers can rest assure that if they move their Ruby code to JRuby, it will run just as well," Nutter said.

A JRuby user lauded the new release.

"The improved Ruby-to-Java and Java-to-Ruby calling is very welcome," said Ben Summers, technical director at OneIS, which offers a SaaS platform for information management. The platform is based on Java and Ruby.

"Our code is has become very mixed-language as we take advantage of the best that each language can offer. But mainly, it's the incremental improvements on compatibility, performance, and features [that] make our application faster and easier to develop," Summers said.

"There's nothing really 'missing' as such [in JRuby 1.5], but there's potential for some really interesting features in the future, such as extensions to the language for more Java integration and partial static typing for performance," said Summers.

He did cite an issue pertaining to Ruby libraries, however.

"The only slight problem with JRuby is that Ruby libraries are often partly written in C. Because JRuby is totally different to C Ruby, these are not compatible. In practice, this isn't too much of a problem," Summers said.

Engine Yard, meanwhile, offers commercial support for JRuby. Both Enebo and Nutter had worked on JRuby while serving as software engineers at the now-defunct Sun Microsystems. They made the move to Engine Yard last year, ahead of Oracle's completing its Sun acquisition.

This article, "JRuby upgrade features Java accommodations," was originally published at InfoWorld.com. Follow the latest developments in business technology news and get a digest of the key stories each day in the InfoWorld Daily newsletter and on your mobile device at infoworldmobile.com.

Copyright © 2010 IDG Communications, Inc.

How to choose a low-code development platform