From: Jörg W Mittag on
Roger Pack wrote:
> Charles Nutter wrote:
>> FWIW, you can create a single-file executable (a jar file, basically,
>> run with java -jar jarfile.jar) with JRuby that runs anywhere Java's
>> installed and doesn't require any per-machine build or any other
>> dependencies to be installed (including JRuby itself). Might be an
>> easier path, if you're willing to use JRuby.
> Are there any step by step instructions on how to do that anywhere, by
> chance?

It's been several years since I last tried it, but IIRC it's basically

gem install rawr
cd /path/to/your/project
rawr install
# edit /path/to/your/project/build_configuration.rb
rake rawr:jar # create an executable jar file
rake rawr:bundle:exe # create a Windows executable
rake rawr:bundle:app # create an OSX app bundle

And that's more or less it.

Note that you will probably have to edit at least the c.source_dirs
configuration value, since Rawr generally assumes that you have a
mixed project and that your Ruby code lives under lib/ruby instead of
just lib. Other than that, you should be fine, Rawr will even
autodetect the c.project_name (I assume from the directory).

jwm