Package jruby scripts as a jar

I have a command line jruby script that I want to package as a jar so
any java user without jruby can run it like:
java -jar my-jruby-app.jar arg1

I saw this link to build a custom jruby jar but i want to be able to
have the java jar command start the script itself.
http://ketan.padegaonkar.name/2009/04/10/run-jruby-from-within-a-jar-and-package-your-own-gems-along.html

is this possible?


@tommychheng
Programmer and UC Irvine Graduate Student
Find a great grad school based on research interests:
http://gradschoolnow.com


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi
Rawr might do what you need.
http://rawr.rubyforge.org/

Regards,
Tim

On Jun 3, 2010, at 8:16 AM, Tommy C. wrote:

Programmer and UC Irvine Graduate Student
Find a great grad school based on research interests: http://gradschoolnow.com


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkwIq9cACgkQLbWJItnd6CwHlQCfVaoghmNUHSBLlgug/LeoQDvX
jLcAniVl3vsl61+P9H1uv6q/nqkKEnet
=EKMg
-----END PGP SIGNATURE-----


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

We used RAWR for a while and it works pretty well. Now we just define a
main driver script (say main.rb), compile it to a .class file, include
it
into the root directory of our jar-ed application, and set the
Main-Class
attribute in the manifest file to ‘main’. You can either add
jruby-complete-1.X.X.jar to the Class-Path manifest attribute or copy
the
jruby-complete jar contents into your own jar.

The pathing can be a bit of a pain to get figured out the first time.
Be
aware of http://jira.codehaus.org/browse/JRUBY-4825.

Thanks,
Ben Christenson
Developer/Analyst

Kinetic Data, Inc.
“Building a Better Service Experience”
Recipient of the WWRUG09 Innovator of the Year Award

651.556.0937 I www.kineticdata.com http://www.kineticdata.com