Hello List.
I am trying to port a simple Java demo to a JRuby file.
The Java demo is listed here:
Currently I have written this:
Here is what I see when I run my JRuby file:
$ jruby main.rb
main.rb:11:in `main’: uninitialized constant Main::SampleFrame
(NameError)
from main.rb:23
If this were a plain Ruby script I’d think that I forgot declarations:
require and include
When I look for SampleFrame.class I do see it in the directory right
next to my JRuby script:
$ ls -la SampleFrame*
-rw-r–r-- 1 maco staff 615 Aug 6 19:05 SampleFrame$1.class
-rw-r–r-- 1 maco staff 627 Aug 6 19:05 SampleFrame$10.class
-rw-r–r-- 1 maco staff 623 Aug 6 19:05 SampleFrame$11.class
-rw-r–r-- 1 maco staff 616 Aug 6 19:05 SampleFrame$12.class
-rw-r–r-- 1 maco staff 622 Aug 6 19:05 SampleFrame$13.class
-rw-r–r-- 1 maco staff 635 Aug 6 19:05 SampleFrame$14.class
-rw-r–r-- 1 maco staff 620 Aug 6 19:05 SampleFrame$15.class
-rw-r–r-- 1 maco staff 619 Aug 6 19:05 SampleFrame$16.class
-rw-r–r-- 1 maco staff 620 Aug 6 19:05 SampleFrame$17.class
-rw-r–r-- 1 maco staff 624 Aug 6 19:05 SampleFrame$18.class
-rw-r–r-- 1 maco staff 622 Aug 6 19:05 SampleFrame$19.class
-rw-r–r-- 1 maco staff 618 Aug 6 19:05 SampleFrame$2.class
-rw-r–r-- 1 maco staff 620 Aug 6 19:05 SampleFrame$20.class
-rw-r–r-- 1 maco staff 624 Aug 6 19:05 SampleFrame$21.class
-rw-r–r-- 1 maco staff 622 Aug 6 19:05 SampleFrame$22.class
-rw-r–r-- 1 maco staff 625 Aug 6 19:05 SampleFrame$23.class
-rw-r–r-- 1 maco staff 622 Aug 6 19:05 SampleFrame$24.class
-rw-r–r-- 1 maco staff 625 Aug 6 19:05 SampleFrame$25.class
-rw-r–r-- 1 maco staff 626 Aug 6 19:05 SampleFrame$26.class
-rw-r–r-- 1 maco staff 624 Aug 6 19:05 SampleFrame$27.class
-rw-r–r-- 1 maco staff 625 Aug 6 19:05 SampleFrame$28.class
-rw-r–r-- 1 maco staff 614 Aug 6 19:05 SampleFrame$29.class
-rw-r–r-- 1 maco staff 618 Aug 6 19:05 SampleFrame$3.class
-rw-r–r-- 1 maco staff 614 Aug 6 19:05 SampleFrame$30.class
-rw-r–r-- 1 maco staff 621 Aug 6 19:05 SampleFrame$4.class
-rw-r–r-- 1 maco staff 619 Aug 6 19:05 SampleFrame$5.class
-rw-r–r-- 1 maco staff 622 Aug 6 19:05 SampleFrame$6.class
-rw-r–r-- 1 maco staff 622 Aug 6 19:05 SampleFrame$7.class
-rw-r–r-- 1 maco staff 628 Aug 6 19:05 SampleFrame$8.class
-rw-r–r-- 1 maco staff 623 Aug 6 19:05 SampleFrame$9.class
-rw-r–r-- 1 maco staff 21698 Aug 6 19:05 SampleFrame.class
-rw-r–r–@ 1 maco staff 33436 Apr 30 05:03 SampleFrame.java
One obvious thing I tried was adding this declaration:
include_class ‘SampleFrame’
So, now I have this:
When I do that I see this:
$ jruby main.rb
/pt/jruby/jruby-1.5.1/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:26:in
`include_class’: cannot link Java class SampleFrame, probable missing
dependency: SampleFrame (wrong name: TestJavaClient/SampleFrame)
(NameError)
from main.rb:8
I’m new to JRuby so I’d welcome any comments on how to understand this
error message.
Thanks!
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email