# Getting Constructor Not Found (Ruby Java Bridge, RJB)

**URL:** <https://www.ruby-forum.com/t/getting-constructor-not-found-ruby-java-bridge-rjb/184863>\
**Category:** Ruby\
**Created:** [March 9, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/getting-constructor-not-found-ruby-java-bridge-rjb/184863 "2010-03-09T18:06:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anukulsinghal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Post date:** [March 9, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/getting-constructor-not-found-ruby-java-bridge-rjb/184863/1 "2010-03-09T18:06:32Z")

</div>

Hi,

I am a newbie to using RJB gem, and this is the issue I am facing.  
Following is my code:

require ‘rjb’

classpath = “”  
Rjb::load(classpath, [“-DMC\_HOME=”])

selenium\_import =  
Rjb::import(‘com.thoughtworks.selenium.DefaultSelenium’)

selenium\_obj =  
selenium\_import.new\_with\_sig(“Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;”,  
“localhost”, 4444, “\*iexplore”, “[http://www.google.com](http://www.google.com)”)

selenium\_obj.open(“/”)  
selenium\_obj.type(“q”, “rubyist”)

When I run this code, I get the following error:

RuntimeError: Constructor not found in new\_with\_sig

I checked the constructor details of DefaultSelenium java class in  
[http://svn.openqa.org/fisheye/browse/~raw,r=1656/selenium-rc/trunk/website/java/com/thoughtworks/selenium/DefaultSelenium.html](http://svn.openqa.org/fisheye/browse/~raw,r=1656/selenium-rc/trunk/website/java/com/thoughtworks/selenium/DefaultSelenium.html),  
and matched the sig accordingly, but still I get the constructor error  
everytime.

Any help to troubleshoot this will be very generous.

Thanks,  
Anukul
