require_java 'org.beanworms.test.Talker'
t = Talker.new
t.talk "XRuby"
t.talk "Mr.", "XRuby"
_________________________________________________________________
Need a break? Find your escape route with Live Search Maps.
http://maps.live.com/?icid=hmtag3
Thanks
Yu Su
import "java.util.*"
r = Random.new
puts r.nextInt
array = ArrayList.new
array.add 1
array.add 2
array.add 3
for i in 1 ... 3
puts array.get(i)
end
Although import the whole package,but not import all classes right
now. Every class in the package only be imported in need.This is
accomplished throught hacking code in
RubyAPI#getCurrentNamespaceConstant method.
I agree with femto that import is more Java rather than Ruby.
2007/5/18, femto <femt...@gmail.com>:
--
Everything is simple!
On May 18, 10:48 am, dreamhead <dreamhead...@gmail.com> wrote:
> I've developed a function like this. Just search jar or directory for
> .class file. It sucks but works.
>
> I agree with femto that import is more Java rather than Ruby.
>
> 2007/5/18, femto <femto...@gmail.com>: