On Sep 8, 2010, at 10:09 PM, Roger P. wrote:
I’m familiar with how to require jar files, but I can’t seem to quite be
able to figure out how to reference a class like this:
Hi Roger - I struggled with this for a while as well. This is what
works for me.
Let’s say I have ‘myclass.class’ which has a class called ‘myclass’ in
‘mypackage.myclass’. This causes two problems because JRuby doesn’t
like non-Camelcased classes (because Modules have to have cap-Alpha
starts I think).
First, create a directory (under lib/ for example - though not
necessary) called mypackage and put myclass.class in there.
Then this should work:
$CLASSPATH << ‘lib’
myclass = JavaUtilities.get_proxy_class(‘mypackage.myclass’)
@myclass = myclass.new
To unsubscribe from this list, please visit: