<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dot.Using &#187; java</title>
	<atom:link href="http://blog.kesor.net/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kesor.net</link>
	<description>Making technology about computers, and computers about usability.</description>
	<lastBuildDate>Mon, 29 Jun 2009 22:46:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JRuby in a JAR</title>
		<link>http://blog.kesor.net/2007/08/14/jruby-in-a-jar/</link>
		<comments>http://blog.kesor.net/2007/08/14/jruby-in-a-jar/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 02:05:22 +0000</pubDate>
		<dc:creator>kesor</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.kesor.net/2007/08/14/jruby-in-a-jar/</guid>
		<description><![CDATA[A bit of fairy dust, a sprinkle of elven blood, lots of water and boil it all for 5 hours on a low fire. What you get? &#8230; I wouldn&#8217;t know, but I do know that it took me almost 2 whole days to grasp the idea of a JRuby in a JAR, with two [...]]]></description>
			<content:encoded><![CDATA[<p>A bit of fairy dust, a sprinkle of elven blood, lots of water and boil it all for 5 hours on a low fire. What you get? &#8230; I wouldn&#8217;t know, but I do know that it took me almost 2 whole days to grasp the idea of a JRuby in a JAR, with two bootstrappers!</p>
<p>Let&#8217;s assume that I wrote this great utility that does this magnificent function that will help mankind. And this utility/software needs a computer to run. Now, I speak Ruby quite well &#8211; and specify my behavior thoroughly with RSpec. But alas &#8211; most computers don&#8217;t have ruby installed (Java JRE yes, Ruby no, especially in enterprises).</p>
<p>So let&#8217;s also assume that some giants wrote a Ruby interpreter that can run on a JVM, and called it JRuby. And further more assume that most java &#8220;utilities&#8221; can be written inside a single jar, and can be executed with:</p>
<pre lang="shell">java -jar fairy_dust.jar
</pre>
<p><br/><br />
How can I take my ruby code and have it run just like the above? With just a single file and all &#8230;</p>
<p>Answer:<br />
1. <a href="http://jruby.org/">JRuby</a><br />
2. <a href="http://one-jar.sf.net">One-jar</a><br />
3. <a href="http://www.headius.com/jrubywiki/index.php/Java_Integration">Custom Bootstrapper</a></p>
<p>And the result is &#8211; a JAR file, with multiple Ruby files inside &#8211; that works just like a java jar:</p>
<pre lang="shell">java -jar rubified.jar
</pre>
<p><br/><br />
And you can get all the above (with the ant build.xml) for the price of one download!</p>
<p>Presenting: <b><a href='http://blog.kesor.net/wp-content/uploads/2007/08/rubified-01.zip' title='Rubified 0.1 BETA'>Rubified 0.1 BETA</a></b></p>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.kesor.net%2F2007%2F08%2F14%2Fjruby-in-a-jar%2F&amp;title=JRuby%20in%20a%20JAR&amp;bodytext=A%20bit%20of%20fairy%20dust%2C%20a%20sprinkle%20of%20elven%20blood%2C%20lots%20of%20water%20and%20boil%20it%20all%20for%205%20hours%20on%20a%20low%20fire.%20What%20you%20get%3F%20...%20I%20wouldn%27t%20know%2C%20but%20I%20do%20know%20that%20it%20took%20me%20almost%202%20whole%20days%20to%20grasp%20the%20idea%20of%20a%20JRuby%20in%20a%20JAR%2C%20with%20two%20bootstrapper" title="Digg"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.kesor.net%2F2007%2F08%2F14%2Fjruby-in-a-jar%2F&amp;title=JRuby%20in%20a%20JAR&amp;notes=A%20bit%20of%20fairy%20dust%2C%20a%20sprinkle%20of%20elven%20blood%2C%20lots%20of%20water%20and%20boil%20it%20all%20for%205%20hours%20on%20a%20low%20fire.%20What%20you%20get%3F%20...%20I%20wouldn%27t%20know%2C%20but%20I%20do%20know%20that%20it%20took%20me%20almost%202%20whole%20days%20to%20grasp%20the%20idea%20of%20a%20JRuby%20in%20a%20JAR%2C%20with%20two%20bootstrapper" title="del.icio.us"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.kesor.net%2F2007%2F08%2F14%2Fjruby-in-a-jar%2F&amp;title=JRuby%20in%20a%20JAR" title="Reddit"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.kesor.net%2F2007%2F08%2F14%2Fjruby-in-a-jar%2F" title="Technorati"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=JRuby%20in%20a%20JAR&amp;body=http%3A%2F%2Fblog.kesor.net%2F2007%2F08%2F14%2Fjruby-in-a-jar%2F" title="email"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.kesor.net%2F2007%2F08%2F14%2Fjruby-in-a-jar%2F&amp;t=JRuby%20in%20a%20JAR" title="Facebook"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.kesor.net%2F2007%2F08%2F14%2Fjruby-in-a-jar%2F&amp;title=JRuby%20in%20a%20JAR&amp;annotation=A%20bit%20of%20fairy%20dust%2C%20a%20sprinkle%20of%20elven%20blood%2C%20lots%20of%20water%20and%20boil%20it%20all%20for%205%20hours%20on%20a%20low%20fire.%20What%20you%20get%3F%20...%20I%20wouldn%27t%20know%2C%20but%20I%20do%20know%20that%20it%20took%20me%20almost%202%20whole%20days%20to%20grasp%20the%20idea%20of%20a%20JRuby%20in%20a%20JAR%2C%20with%20two%20bootstrapper" title="Google Bookmarks"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="" title="Pownce"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/" title="Pownce" alt="Pownce" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="" title="TwitThis"><img src="http://blog.kesor.net/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.kesor.net/2007/08/14/jruby-in-a-jar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.190 seconds -->
