|
Re: Apache Batik: msg#00008lang.jruby.user
PS I'm not an expert on JRuby or Java integration BTW but I have used it, but I've used the other model described on http://jruby.sourceforge.net/docs/java-overview.shtml require 'java' include_class 'java.util.Random' r = Random.new puts r.nextInt Have you tried doing it this way instead? Quoting Mark Wong-VanHaren <markwvh@xxxxxxxxx>: > Hi, folks- > > I am attempting to use JRuby to control Apache Batik. > (The Rasterizer, specifically.) > > I am utterly Java-ignorant. The problem I'm encountering > may well be very simple, just due to my complete Java ignorance. > Maybe someone more clueful can steer me right? > > The JRE (1.5.0_06) works fine; I can run the Batik-rasterizer JAR with it. > Also, JRuby (0.8.2) works fine; it successfully runs the JRuby sample scrip= > ts. > No problems there. > > What I'm ignorant about is how to do is to make JRuby recognize > Java classes/projects which are *not* part of the standard Java distro. > > My jruby script: > =3D=3D=3D=3D=3D=3D > require 'java' > module Foo > include_package 'org.apache.batik.apps.rasterizer' > converter =3D Main.new # Main is a class in Rasterizer > end > =3D=3D=3D=3D=3D=3D > > Running this (using bin/jruby.rb) produces the following error: > =3D=3D=3D=3D=3D > /home/enebo/release/jruby/src/builtin/javasupport.rb:409:in > `const_missing': uninitialized constant Main at Bobo (NameError) > from /home/enebo/release/jruby/src/builtin/javasupport.rb:409:in > `const_missing' > from svg_rasterizer.rb:4 > from :0 > =3D=3D=3D=3D=3D > > I presume that means that JRuby doesn't know where to find > "org.apache.batik.apps.rasterizer"? > > For rasterizer, I have both the JAR file and all the .java files. > > For the .java files, I set the environment variable CLASSPATH > to the dir just above "org", hoping that would help it find it, but no luck= > . > > For the .jar file, I've put it everywhere I could think of: in the > present working directory, in /usr/lib, and I-don't-remember-where-else, > with the same results. > > I would be greatly indebted to anyone who might point me > in the right direction. > > Thanks! > -Mark > mark wong-vanharen > markwvh at gmail dot com > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Jruby-user mailing list > Jruby-user@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/jruby-user > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Java, JRuby, and Eclipse: 00008, Thomas E Enebo |
|---|---|
| Next by Date: | Re: Apache Batik: 00008, Charles O Nutter |
| Previous by Thread: | Re: Apache Batiki: 00008, Thomas E Enebo |
| Next by Thread: | Re: Apache Batik: 00008, Charles O Nutter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |