|
Apache Batik: msg#00005lang.jruby.user
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 scripts. 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: ====== require 'java' module Foo include_package 'org.apache.batik.apps.rasterizer' converter = Main.new # Main is a class in Rasterizer end ====== Running this (using bin/jruby.rb) produces the following error: ===== /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 ===== 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&kid3432&bid#0486&dat1642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Java, JRuby, and Eclipse: 00005, Rich Morin |
|---|---|
| Next by Date: | Re: Apache Batik: 00005, Charles O Nutter |
| Previous by Thread: | Java, JRuby, and Eclipsei: 00005, Rich Morin |
| Next by Thread: | Re: Apache Batik: 00005, Charles O Nutter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |