Require 'java' returns false

Hi

I am new to jruby. I have extracted jruby 1.1RC and using jdk 1.6.
In the .rb files the very first line require ‘java’ gives the following
error,

C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- java (LoadError) from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from c.rb:1

When I tried with “jirb”, the statment require ‘java’ returns false.

How can this issue be resolved ?

VENU

Venugopal Shenoy wrote:

Hi

I am new to jruby. I have extracted jruby 1.1RC and using jdk 1.6.
In the .rb files the very first line require ‘java’ gives the following
error,

C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- java (LoadError) from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from c.rb:1

When I tried with “jirb”, the statment require ‘java’ returns false.

How can this issue be resolved ?

VENU

I believe you have to use “include Java”
That works for me

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs