Hi,
I’m trying to use a java class via yajb in Ruby on Rails.
yajb works fine for calling Java library classes, but I can’t get my
own java classes to work.
I have:
- a class file anon.example.ImportTest in directory
/home/elmar/railswork/myapp/lib/java/anon/example
- a controller with JBRIDGE_OPTIONS = { :classpath =>
‘/home/elmar/railswork/myapp/lib/java’ }
yet instantiating a ruby variable like
testvar = jnew :ImportTest
fails.
Is there anything obvious I’m doing wrong?
Thanks for any help,
Elmar
On Mon, 2006-11-27 at 19:50 +0900, Elmar Schraml wrote:
Hi,
I’m trying to use a java class via yajb in Ruby on Rails.
yajb works fine for calling Java library classes, but I can’t get my
own java classes to work.
Hm, check out this YAJB presentation here:
http://novarug.org/articles/2006/07/20/august-novarug-meeting
I think Paul said something about CLASSPATH in there…
Yours,
tom
Here’s a direct link to the slides:
http://paul.stadig.name/assets/2006/11/7/Ruby_Presentation.pdf
You have to configure YAJB with the JBRIDGE_OPTIONS constant. There’s
an example on page 9.
Feel free to e-mail me directly ([email protected]) if you have other
questions.
Good Luck,
Paul
Tom C. wrote:
On Mon, 2006-11-27 at 19:50 +0900, Elmar Schraml wrote:
Hi,
I’m trying to use a java class via yajb in Ruby on Rails.
yajb works fine for calling Java library classes, but I can’t get my
own java classes to work.
Hm, check out this YAJB presentation here:
http://novarug.org/articles/2006/07/20/august-novarug-meeting
I think Paul said something about CLASSPATH in there…
Yours,
tom