<?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; jruby</title>
	<atom:link href="http://blog.kesor.net/category/jruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kesor.net</link>
	<description>Making technology about computers, and computers about usability.</description>
	<lastBuildDate>Tue, 30 Aug 2011 00:30:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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>
]]></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.391 seconds -->

