[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

java classpath for yajb

Elmar Schraml

11/27/2006 10:47:00 AM

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

2 Answers

Tom Copeland

11/27/2006 11:03:00 PM

0

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-novar...

I think Paul said something about CLASSPATH in there...

Yours,

tom



Paul Stadig

11/28/2006 1:45:00 AM

0

Here's a direct link to the slides:
http://paul.stadig.name/assets/2006/11/7/Ruby_Presen...

You have to configure YAJB with the JBRIDGE_OPTIONS constant. There's
an example on page 9.

Feel free to e-mail me directly (paul@stadig.name) if you have other
questions.


Good Luck,
Paul

Tom Copeland 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-novar...
>
> I think Paul said something about CLASSPATH in there...
>
> Yours,
>
> tom


--
Posted via http://www.ruby-....