<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>dekstop weblog : JRuby as Interactive Java Shell</title>
    <link>http://dekstop.de/weblog/2007/07/jruby_java_shell/</link>
    <description>Get the JRuby Console, and then do stuff like this: irb(main):001:0&gt; require &apos;java&apos; =&gt; true irb(main):002:0&gt; p = java.util.regex.Pattern.compile(&quot;/music/[^/]+/\\+images/[^/?]+?(?:\\?.*)?&quot;) =&gt; #:0x5efe34 @java_object=/music/[^/]+/\+images/[^/?]+?(?:\?.*)?&gt; irb(main):003:0&gt; p.matcher(&quot;/music/Christopher+Willits/+images/?&quot;).matches =&gt; false irb(main):004:0&gt; p.matcher(&quot;/music/Christopher+Willits/+images?&quot;).matches =&gt; false irb(main):005:0&gt; p.matcher(&quot;/music/Christopher+Willits/+images/&quot;).matches =&gt; false irb(main):006:0&gt; p.matcher(&quot;/music/Christopher+Willits/+images/34523&quot;).matches =&gt; true Awesome! I&apos;ve been waiting years for a convenient interactive Java shell -- ...</description>
    <dc:language>en-us</dc:language>
    <dc:rights>Copyright 2007 Martin Dittus</dc:rights>
    <lastBuildDate>Fri, 06 Jul 2007 11:09:23 GMT</lastBuildDate>
    <generator>MicroLinks 5.6 (dekstop.de)</generator>
    <managingEditor>public&#64;dekstop&#46;de</managingEditor>
    <webMaster>public&#64;dekstop&#46;de</webMaster>



    <item>
      <title>JRuby as Interactive Java Shell</title>
      <link>http://dekstop.de/weblog/2007/07/jruby_java_shell/</link> 
      <description><![CDATA[<p>Get the <a href="http://jruby.codehaus.org/Running+the+JRuby+Console+(graphical+IRB)">JRuby Console</a>, and then <a href="http://www.headius.com/jrubywiki/index.php/Calling_Java_from_JRuby">do</a> stuff like this:</p>

<pre>
irb(main):001:0> require 'java'
=> true
irb(main):002:0> p = java.util.regex.Pattern.compile("/music/[^/]+/\\+images/[^/?]+?(?:\\?.*)?")
=> #<#<Class:01xad0dd8>:0x5efe34 @java_object=/music/[^/]+/\+images/[^/?]+?(?:\?.*)?>
irb(main):003:0> p.matcher("/music/Christopher+Willits/+images/?").matches
=> false
irb(main):004:0> p.matcher("/music/Christopher+Willits/+images?").matches
=> false
irb(main):005:0> p.matcher("/music/Christopher+Willits/+images/").matches
=> false
irb(main):006:0> p.matcher("/music/Christopher+Willits/+images/34523").matches
=> true
</pre>

<p>Awesome! I've been waiting years for a convenient interactive Java shell -- and not to run the language, but to interactively test behaviour of library features under certain conditions. Don't want to write &amp; compile a new class just because I want to check something out.</p>]]></description>
      <dc:creator>Martin Dittus</dc:creator>
      <category>tools</category>
      
      <guid isPermaLink="true">http://dekstop.de/weblog/2007/07/jruby_java_shell/</guid>
      <pubDate>Fri, 06 Jul 2007 11:09:23 GMT</pubDate>
    </item>
  </channel>
</rss>
