# Q: Packaging JRuby

**URL:** <https://www.ruby-forum.com/t/q-packaging-jruby/144931>\
**Category:** Ruby\
**Created:** [August 4, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/q-packaging-jruby/144931 "2008-08-04T13:51:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GSRalph\_KuntzS\_MD](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c89c15/32.png) [@GSRalph\_KuntzS\_MD](https://www.ruby-forum.com/u/GSRalph_KuntzS_MD)\
**Post date:** [August 4, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/q-packaging-jruby/144931/1 "2008-08-04T13:51:01Z")

</div>

What are the options for packaging a JRuby script? I tried the  
tutorial from netbeans for making a JRuby Swing application, but it  
fails to run; it gets the following error: -e:1:in `require’: no such  
file to load – /scripts/main (LoadError). I realize that the tutorial  
actually has a bug in it; it refers to the ‘swingjruby2.scripts’  
package in the text, but ‘scripts’ in the dialog boxes.

I would like to package JRuby scripts that I am writing to run as  
utilities on remote machines that I manage. The machines have the JVM  
on them, but JRuby is not installed. I would also like to be able to  
send the utilities to customers. They too have the JVM, but no JRuby,  
and I cannot expect them to install it (they are computer naive).

The packaging must allow the script to be in a single file (.jar  
or .exe).

I have used RubyScript2Exe, but I am planning on also using Java  
runtime code in my scripts (like Swing), so the packaging must apply  
to JRuby.

Any ideas?

Thanks, Ralph

---

<div class="post-metadata">

**Author:** ![GSRalph\_KuntzS\_MD](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c89c15/32.png) [@GSRalph\_KuntzS\_MD](https://www.ruby-forum.com/u/GSRalph_KuntzS_MD)\
**Post date:** [August 4, 2008, 5:55pm UTC](https://www.ruby-forum.com/t/q-packaging-jruby/144931/2 "2008-08-04T17:55:35Z")

</div>

G. Ralph Kuntz, MD, MS wrote:

> send the utilities to customers. They too have the JVM, but no JRuby,  
> and I cannot expect them to install it (they are computer naive).

Take a look at rawr. It’s intended to make it snake-simple to package  
up JRuby apps as .exe, .app, or as an executable jar.

[http://rubyforge.org/projects/rawr/](http://rubyforge.org/projects/rawr/)

for the gem.

Actual source code is hosted on gitorious:

[http://gitorious.org/projects/rawr](http://gitorious.org/projects/rawr)

–  
James B.

[www.happycamperstudios.com](http://www.happycamperstudios.com) - Wicked Cool Coding  
[www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff

---

<div class="post-metadata">

**Author:** ![GSRalph\_KuntzS\_MD](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c89c15/32.png) [@GSRalph\_KuntzS\_MD](https://www.ruby-forum.com/u/GSRalph_KuntzS_MD)\
**Post date:** [August 5, 2008, 1:10pm UTC](https://www.ruby-forum.com/t/q-packaging-jruby/144931/3 "2008-08-05T13:10:38Z")

</div>

Thanks. I’ll take a look.
