Advertisment

Reuse Java code in your Ruby on Rails applications

author-image
CIOL Bureau
Updated On
New Update

BANGALORE, INDIA: Ruby on Rails (Rails) is a full-stack Web application framework written in Ruby, a feature-rich, free, simple, extensible, portable, object-oriented scripting language. Rails has gained immense popularity among Web application developers. With it, you can quickly and efficiently develop a Web application and deploy it into any Web container, such as IBM WebSphere or Apache Tomcat.

Advertisment

Before Rails and similar Web application development frameworks were available, the de facto standard tool for the job was the Java language, thanks to its platform independence and comprehensive API set. Many Java Web applications are still running, resulting in the ready availability of much useful, well-written Java code (loosely referred to in this tutorial as legacy code). Legacy Java code is usually packaged as a set of JAR files.

If you change your Web application development platform to Rails, you can reuse legacy Java code. The Ruby Java Bridge (RJB) is a toolkit that lets you load JAR files into your Rails application and access the methods and variables in them.

This tutorial explains how to configure and use RJB in a Rails application...!

tech-news