I have been running my bsf-called script and a bunch of includes in a
jar for quite some time, so at least for specific applications this
seems to work fine.

bsf calls init.rb, which adds "./lib" to the include path.  I throw all
library files my application uses (found via some recursive grep
magic...) into "lib" dir under the jar root, and Jruby finds them just
fine, preparsed or not (currently not, as there are issues with it).

However, I'm of course only running a subset of the standard libs, and
like Charles mentioned, there may be others which go nuts.

If its not too many libraries and the fix looks easy, it might be worth
filing bugs with Ruby.  Finding an include through manual file lookup
stuff seems like its pretty bad programming practice anyway.

Evan

Charles O Nutter wrote:
> Actually it's worth mentioning that if you don't need any of Ruby's
> own .rb files (shipped in 0.9.0 but not jarred) the lone jruby.jar
> file works just fine as a bare Ruby interpreter (think Ruby without
> any of the aforementioned .rb files but with all of Java present).
> That's probably enough for folks using it just for the language or for
> many embedding purposes that won't use the core library.
>
> On 7/11/06, *Peter K Chan* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     I agree that the Maven build file would be great. I remember
>     trying to cook up a pom.xml for JRuby 0.8.3, but I don't remember
>     why I didn't finish it. :p
>
>     FYI, you can use the install feature of maven to manually inject
>     the JAR into your location repository:
>
>     mvn install:install-file -Dfile=lib/jruby.jar -DartifactId=jruby
>     -DgroupId=jruby -Dpackaging=jar -Dversion=0.9.0
>
>     Nick, it would be great if you could work up a pom file. If not, I
>     will see about contributing one in the next week.
>
>     Peter
>
>     ________________________________________
>     From: [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]> [mailto:
>     [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>] On Behalf Of
>     Nick Sieger
>     Sent: Tuesday, July 11, 2006 1:44 PM
>     To: jruby-devel@lists.sourceforge.net
>     <mailto:jruby-devel@lists.sourceforge.net>
>     Subject: [Jruby-devel] Ruby in a jar
>
>     Have you guys lent any thoughts to having a distro of JRuby that
>     amounts to the entire thing in a .jar? Will it "just work" to
>     build an uber-jar that contains *.rb files as resources in the
>     jar, that would make usage in embedding applications easier?
>
>     Also, it would be nice to get a copy of jruby.jar out onto
>     www.ibiblio.org/maven <http://www.ibiblio.org/maven> (and maven2)
>     so that other projects can have dependencies on the embeddable
>     uber-jar.
>
>     For the last step we'll need to write a pom (I can do that, have
>     experience w/ maven 2) and follow the steps outlined in [1].
>
>     Thoughts?
>
>     /Nick
>
>     [1] http://maven.apache.org/guides/mini/guide-maven-evangelism.html
>
>
>     -------------------------------------------------------------------------
>     Using Tomcat but need to do more? Need to support web services,
>     security?
>     Get stuff done quickly with pre-integrated technology to make your
>     job easier
>     Download IBM WebSphere Application Server v.1.0.1 based on Apache
>     Geronimo
>     http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>     <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
>     _______________________________________________
>     Jruby-devel mailing list
>     Jruby-devel@lists.sourceforge.net
>     <mailto:Jruby-devel@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/jruby-devel
>
>
>
>
> -- 
> Charles Oliver Nutter @ headius.blogspot.com <http://headius.blogspot.com>
> JRuby Developer @ www.jruby.org <http://www.jruby.org>
> Application Architect @ www.ventera.com <http://www.ventera.com>
> ------------------------------------------------------------------------
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jruby-devel mailing list
> Jruby-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jruby-devel
>   



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to