<?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>Linux Swords &#187; Java</title>
	<atom:link href="http://blog.mjava.ch/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mjava.ch</link>
	<description>kids, baduk und cmd-lines</description>
	<lastBuildDate>Thu, 23 Dec 2010 12:01:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Find a specific class in your maven repository</title>
		<link>http://blog.mjava.ch/2009/01/08/find-a-specific-class-in-your-maven-repository/</link>
		<comments>http://blog.mjava.ch/2009/01/08/find-a-specific-class-in-your-maven-repository/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 22:27:19 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2009/01/08/find-a-specific-class-in-your-maven-repository/</guid>
		<description><![CDATA[If you don&#8217;t want to use findjar, you can use a groovy script.
You can use the following:

It will search recursively all jar files under &#8216;/home/USER/.m2/repository&#8217;, just adjust the value for &#8216;USER&#8217;.
Please excuse the poor formatting of the code, I blame the browser for it  

import java.util.jar.JarFile
if (args?.size() == 0 &#124;&#124; args[0]?.length() == 0)
{
  [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t want to use <a href="http://www.findjar.com">findjar</a>, you can use a groovy script.</p>
<p>You can use the following:<br />
<span id="more-224"></span><br />
It will search recursively all jar files under &#8216;/home/USER/.m2/repository&#8217;, just adjust the value for &#8216;USER&#8217;.</p>
<p>Please excuse the poor formatting of the code, I blame the browser for it <img src='http://blog.mjava.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><code><br />
import java.util.jar.JarFile</p>
<p>if (args?.size() == 0 || args[0]?.length() == 0)<br />
{<br />
    println "usage with Parameters: <ClassNameToSearch> [pathToJarFiles]"<br />
    println "per default /home/USER/.m2/repository will be searched"<br />
    println<br />
    System.exit(1)<br />
}</p>
<p>def searchingClass = args[0]<br />
def folder = args.size() > 1 ? args[1] : "/home/knm/.m2/repository"</p>
<p>println "groovy searching for Class $searchingClass in $folder"<br />
def basedir = new File(folder)</p>
<p>// gets all jar-files in basedir<br />
jars = []<br />
 public void  recursedirs(File filedir)<br />
 {<br />
  filedir.listFiles().each<br />
  { file -><br />
    if (file.isFile() &#038;&#038; file.name.endsWith("jar") )<br />
     { jars << file }<br />
     else if (file.isDirectory() )<br />
     { this.recursedirs(file) }<br />
  }<br />
 }<br />
recursedirs( basedir)<br />
files = jars</p>
<p>for (currentFile in files)<br />
{<br />
    try {<br />
        new JarFile(currentFile).entries().each {entry -><br />
            if (entry.name =~ searchingClass)<br />
            {<br />
                tmp = entry.name.replaceAll("/", ".").replaceAll(".class", "")<br />
                println "$tmp ===> $folder/$currentFile.name"<br />
            }<br />
        }<br />
    }<br />
    catch (Throwable t)<br />
    {<br />
        println "\nFailed to open $currentFile.canonicalPath: ${t.toString()}"<br />
    }<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2009/01/08/find-a-specific-class-in-your-maven-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>created new yubnub command: findjar</title>
		<link>http://blog.mjava.ch/2008/12/31/created-new-yubnub-command-findjar/</link>
		<comments>http://blog.mjava.ch/2008/12/31/created-new-yubnub-command-findjar/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 08:15:53 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[cmd-lines]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/12/31/created-new-yubnub-command-findjar/</guid>
		<description><![CDATA[I just recently stumbled accross www.findjar.com, a usefull tool
to find jar-files [who would have guessed..]
And I created a yubnub command for it: findjar
Hope somebody else finds this usefull too  

Blogged with the Flock Browser

Tags: javajar

]]></description>
			<content:encoded><![CDATA[<p>I just recently stumbled accross www.findjar.com, a usefull tool<br />
to find jar-files [who would have guessed..]</p>
<p>And I created a <a href="http://www.yubnub.org">yubnub</a> command for it: <a href="http://yubnub.org/kernel/man?args=findjar">findjar</a></p>
<p>Hope somebody else finds this usefull too <img src='http://blog.mjava.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a class="noborder" href="http://findjar.com/index.jsp"><img src="http://findjar.com/img/logo.png" /></a></p>
<div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;">Blogged with the <a href="http://www.flock.com/blogged-with-flock" style="color: #999; font-weight: bold;" target="_new" title="Flock Browser">Flock Browser</a></div>
<p><!-- technorati tags begin -->
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/javajar" rel="tag">javajar</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/12/31/created-new-yubnub-command-findjar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Podcast for Software Engineers</title>
		<link>http://blog.mjava.ch/2008/04/15/podcast-for-software-engineers/</link>
		<comments>http://blog.mjava.ch/2008/04/15/podcast-for-software-engineers/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 04:36:47 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/04/15/podcast-for-software-engineers/</guid>
		<description><![CDATA[I recently started to listen to podcast and the variety of podcasts is really big.
I discovered http://www.se-radio.net. This site produces
podcasts for software engineers. I really enjoy the possibility to learn while traveling  
Today, I started listening to the parts of concurrency. Did you know there is a bug classification called Heisenberg-Bugs? A Heisenberg-Bug is [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started to listen to podcast and the variety of podcasts is really big.</p>
<p>I discovered <a href="http://www.se-radio.net">http://www.se-radio.net</a>. This site produces<br />
podcasts for software engineers. I really enjoy the possibility to learn while traveling <img src='http://blog.mjava.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Today, I started listening to the parts of concurrency. Did you know there is a bug classification called <strong>Heisenberg-Bugs</strong>? A Heisenberg-Bug is <span id="more-205"></span> a Bug in a multithreading application which dissappears while debugging, because of the debugging, logging statements etc. you changed the speed and behaviour of the application. So you cannot reproduce the bug in the test-environment, but in the production environment the bug still exists! A real PITA, and with PITA I do not mean the <a href="http://en.wikipedia.org/wiki/Pita">bread</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/04/15/podcast-for-software-engineers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>groovy script beautified</title>
		<link>http://blog.mjava.ch/2008/03/24/groovy-script-beautified/</link>
		<comments>http://blog.mjava.ch/2008/03/24/groovy-script-beautified/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 16:55:33 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[cmd-lines]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[jar]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/03/24/groovy-script-beautified/</guid>
		<description><![CDATA[I rewrote my groovy-script to have better output:
searchJar.groovy
]]></description>
			<content:encoded><![CDATA[<p>I rewrote my <a href="http://blog.mjava.ch/2008/03/11/groovy-script-lookup-classes-in-jar-files/">groovy-script</a> to have better output:</p>
<p><a href='http://blog.mjava.ch/wp-content/uploads/2008/03/searchjar.groovy' title='searchJar.groovy'>searchJar.groovy</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/03/24/groovy-script-beautified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixed &#8216;View Javadoc in external Browser&#8217; in IntelliJ IDEA</title>
		<link>http://blog.mjava.ch/2008/03/15/fixed-view-javadoc-in-external-browser-in-intellij-idea/</link>
		<comments>http://blog.mjava.ch/2008/03/15/fixed-view-javadoc-in-external-browser-in-intellij-idea/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 08:44:56 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[javadoc]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/03/15/fixed-view-javadoc-in-external-browser-in-intellij-idea/</guid>
		<description><![CDATA[An annoyance in IntelliJ IDEA was that the command &#8216;View Javadoc in external Browser&#8217; did not work
per default on a mac. On a mac with it&#8217;s own java sources the api-doc are located inside a jar and therefore
not able to browse through a normal webbrowser. (If you know a browser which can handle a jar://xxx [...]]]></description>
			<content:encoded><![CDATA[<p>An annoyance in IntelliJ IDEA was that the command &#8216;View Javadoc in external Browser&#8217; did not work<br />
per default on a mac. On a mac with it&#8217;s own java sources the api-doc are located inside a jar and therefore<br />
not able to browse through a normal webbrowser. (If you know a browser which can handle a <em>jar://xxx </em>address let me now in a comment)</p>
<p>IntelliJ does not open or extract those files per default so I did by hand with:</p>
<p><code>cd /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home<br />
jar xf docs.jar // this will extract the contents of the jar<br />
jar xf appledocs.jar // dito<br />
</code></p>
<p>No we need to point IntelliJ to the extracted files. Open your Preferences -> Project Preferences.<br />
Click on the desired JDK and then click on the tab &#8216;javadocs&#8217;. Remove the old entries for the jar and enter<br />
the extracted path<code><br />
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/docs/api<br />
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/appledocs/api</code></p>
<p>Not it works. To test it, move the cursor to a class,member whatever and press &lt;Shift&gt;+&lt;F1&gt;. The appropriate javadoc should open in your default browser.</p>
<p>This is not a bug fix, just a bad default configuration. I&#8217;d like to see this fixed in the next release&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/03/15/fixed-view-javadoc-in-external-browser-in-intellij-idea/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA</title>
		<link>http://blog.mjava.ch/2008/03/15/intellij-idea-2/</link>
		<comments>http://blog.mjava.ch/2008/03/15/intellij-idea-2/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 00:38:43 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[intellij]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/03/15/intellij-idea-2/</guid>
		<description><![CDATA[7.0.3 is out now. get it!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jetbrains.com/idea/download/release_notes703.html">7.0.3</a> is out now. get it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/03/15/intellij-idea-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>learning groovy&#8230;</title>
		<link>http://blog.mjava.ch/2008/03/11/learning-groovy/</link>
		<comments>http://blog.mjava.ch/2008/03/11/learning-groovy/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 12:58:14 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/03/11/learning-groovy/</guid>
		<description><![CDATA[&#8230; is like Alice climbing through the rabbit hole.
I just connected to a db, did a query from a table and printed out a selection of columns in just
2 lines of code, yes TWO LINES!
]]></description>
			<content:encoded><![CDATA[<p>&#8230; is like Alice climbing through the rabbit hole.</p>
<p>I just connected to a db, did a query from a table and printed out a selection of columns in just<br />
2 lines of code, yes TWO LINES!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/03/11/learning-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>groovy-script: lookup classes in jar-files</title>
		<link>http://blog.mjava.ch/2008/03/11/groovy-script-lookup-classes-in-jar-files/</link>
		<comments>http://blog.mjava.ch/2008/03/11/groovy-script-lookup-classes-in-jar-files/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 06:48:40 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[cmd-lines]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[jar]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/03/11/groovy-script-lookup-classes-in-jar-files/</guid>
		<description><![CDATA[Recently I had following problem. I had a bunch of jar-files and I had to find out which jar-file was holding a specific class. 
This is a common task, because your java-code told you that a class XY was not in you classpath, so you would have to search for it, if you don&#8217;t know [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had following problem. I had a bunch of jar-files and I had to find out which jar-file was holding a specific class. </p>
<p>This is a common task, because your java-code told you that a class XY was not in you classpath, so you would have to search for it, if you don&#8217;t know already where to find it.</p>
<p>Since I had to do it already 2 times and as I am learning <a href="http://groovy.codehaus.org/">groovy</a> I decided to write a short groovy-script<br />
(are there long groovy-scripts?) which allows me to do that.</p>
<p>It is pretty straight-forward so here it is: <a href='http://blog.mjava.ch/wp-content/uploads/2008/03/searchjar.groovy' title='searchJar.groovy'>searchJar.groovy</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/03/11/groovy-script-lookup-classes-in-jar-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hudson has a groovy console</title>
		<link>http://blog.mjava.ch/2008/03/07/hudson-has-a-groovy-console/</link>
		<comments>http://blog.mjava.ch/2008/03/07/hudson-has-a-groovy-console/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 14:24:08 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://blog.mjava.ch/2008/03/07/hudson-has-a-groovy-console/</guid>
		<description><![CDATA[I am playing around with hudson as a integration server.
So far it is very nice and intuitiv, you can even trigger builds by email, mobile etc! And just
yesterday it has groovy-console builtin for monitoring maven2-builds! 
Isn&#8217;t it a good day when you recover that your new tools already know each other?  
Although I have [...]]]></description>
			<content:encoded><![CDATA[<p>I am playing around with <a href="https://hudson.dev.java.net/">hudson</a> as a integration server.</p>
<p>So far it is very nice and intuitiv, you can even trigger builds by email, mobile etc! And just<br />
yesterday it has <strong>groovy</strong>-console builtin for monitoring <strong>maven2</strong>-builds! </p>
<p>Isn&#8217;t it a good day when you recover that your new tools already know each other? <img src='http://blog.mjava.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Although I have to admit that hudson lacks some features I would like to have such as<br />
access-control per project. For now there is an access-control (LDAP, Matrix-like etc) for the whole build-server&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/03/07/hudson-has-a-groovy-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSR 666</title>
		<link>http://blog.mjava.ch/2008/02/13/jsr-666/</link>
		<comments>http://blog.mjava.ch/2008/02/13/jsr-666/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 21:19:10 +0000</pubDate>
		<dc:creator>mjava</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jsr]]></category>

		<guid isPermaLink="false">http://mjava.ch/wordpress/2008/02/13/jsr-666/</guid>
		<description><![CDATA[I just read about JSR 666.
First I took it for serious, but when i read about Schr&#246;dingerException
I could not help laughing.
My other favorite tough was &#8216;import *;&#8216;
]]></description>
			<content:encoded><![CDATA[<p>I just read about <a href="http://java.dzone.com/news/jsr-666-solving-javas-problems">JSR 666</a>.</p>
<p>First I took it for serious, but when i read about <a href="http://fishbowl.pastiche.org/2008/02/13/jsr666_extension_exception_types">Schr&ouml;dingerException</a><br />
I could not help laughing.</p>
<p>My other favorite tough was &#8216;<a href="http://www.bright-green.com/blog/2003_02_03/jsr_666_programmability_enhanc.html">import *;</a>&#8216;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mjava.ch/2008/02/13/jsr-666/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

