I can not seem to get Example 1.10 to work using Netbeans 6.51 or 6.7. I
create a Java Application project in Netbeans and pasted the code from
the
book in verbatim.
I was finally able to resolve org.jruby.Ruby by specifically adding
C:\Program Files\NetBeans 6.7\ruby2\jruby-1.2.0\lib\jruby.jar
to the library options for the project - not ideal I think but it works
But that still left me with these errors:
package org.jrubycookbook.ch01; // incorrect package name - also, is
this
perhaps where PrintJavaClass should reside?
public class PrintJavaClass // PrintJavaClass is public, it should be
declared in a file named PrintJavaClass.java
List interfaces = Arrays.asList(o.getClass().getInterfaces()); //
Incompatible types required java.util.List<java.lang.Class> found
java.util.List<java.lang.Class<?>>
What environment where you using where you didn’t get these errors?
Carl G. wrote:
Actually I did find instances of the jruby.jar but I think for some reason
these are not considered path of the default classpathC:\Program Files\NetBeans
6.7\ruby2\jruby-1.2.0\lib\jruby.jar\org\jruby\Ruby.class
C:\Program Files\NetBeans 6.5\ruby2\jruby-1.1.6\lib\jruby.jar\org\jruby
Ruby.classCarl G. wrote:
6.7 download (Java and Ruby) and also tried adding Ruby and JRuby plugins
to download some associated sample programs or libraries or the I need to
But I see no call to “to_java” in the sample code.
import org.jruby.javasupport.JavaEmbedUtils;
interfaces);
writer.printf(“%s (inside array), implements %s\n”, className,
+ “puts "#{o.to_s} - #{@printer.output(o)}"\n”
runtime.evalScriptlet(script);
JavaEmbedUtils.terminate(runtime);
}
}
–
View this message in context:
http://www.nabble.com/JRuby-Cookbook-example-1.10-tp24263046p24263046.html
Sent from the JRuby - User mailing list archive at Nabble.com.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email