<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-20262156</id><updated>2024-10-04T19:05:10.392-07:00</updated><category term="Java"/><category term="Linux"/><category term="ubuntu"/><category term="maven"/><category term="thunderbird"/><category term="Information Security"/><category term="code"/><category term="Hacking"/><category term="ant"/><category term="flex"/><category term="gnome"/><category term="kde"/><category term="pivot"/><category term="ria"/><category term="sudo"/><category term="Ajax"/><category term="Design patterns"/><category term="ESB"/><category term="GlassfishESB"/><category term="Java coding conventions"/><category term="Lightning"/><category term="Multi Threading"/><category term="ServiceMix"/><category term="api"/><category term="blogger"/><category term="bzip"/><category term="classloader"/><category term="code review"/><category term="concurrency"/><category term="continnuem"/><category term="continuous integration"/><category term="eclipse"/><category term="fat jar"/><category term="html 5"/><category term="hudson"/><category term="java.io"/><category term="junit"/><category term="log4j"/><category term="maven plugins"/><category term="microsoft"/><category term="netconnect"/><category term="networking"/><category term="one jar"/><category term="openoffice"/><category term="performance"/><category term="reiserfs"/><category term="reliance"/><category term="silverlight"/><category term="suse"/><category term="tar"/><category term="teamcity"/><category term="twitter"/><category term="ubuntu crash"/><category term="viruses"/><category term="windows"/><category term="xubuntu"/><title type='text'>Running on Linux, Building with Java</title><subtitle type='html'>Linux, Java and Technology in general</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20262156.post-5082236743345955164</id><published>2010-07-29T23:57:00.000-07:00</published><updated>2010-07-30T00:00:50.936-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Compilation Failure is the best Failure!</title><content type='html'>What I am going to write may sound really obvious but surprisingly I see this problem at soo many places that it deserves a post.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s a Rule 1: &lt;b&gt;&lt;i&gt;&quot;If you are doing an instanceof and you are in control of that class, you can instead delegate to the class&quot;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Meaning, if you were making a decision of what code to execute by checking an instanceof and the class being checked is the one that you control, as in the one that you can modify, add methods change code, then you should delegate the decision of what should be executed to that class instead.&lt;br /&gt;
&lt;br /&gt;
Lets look at an example,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;public static void speak(Animal animal)&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (animal instanceof Dog) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;bhow.. bhow...&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (animal instanceof Cat) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; System.out.println(&quot;meow.. meow...&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (animal instanceof Tiger) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; System.out.println(&quot;Grrrr...&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/blockquote&gt;&lt;blockquote&gt;} &lt;/blockquote&gt;&lt;br /&gt;
could really be changed to, &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Animal animal = getAnimal();&lt;br /&gt;
animal.speak();&lt;/blockquote&gt;&lt;br /&gt;
Where classes Dog, Cat and Tiger now will implement the speak() method.&lt;br /&gt;
&lt;br /&gt;
It sounds really obvious doesn&#39;t it? If it really does, just do a search of instanceof keyword in your code and ask the same question. The &quot;speak&quot; operation comes very naturally to the Animal but sometimes you will find that since we don&#39;t think something is natural to that Entity or class, we don&#39;t add it there.&lt;br /&gt;
&lt;br /&gt;
There is an anti-pattern called &lt;a href=&quot;http://martinfowler.com/bliki/AnemicDomainModel.html&quot;&gt;&quot;Anemic Domain Model&quot;&lt;/a&gt; which will specially suffer this problem. This pattern encourages to keep the Behavior separate from the Data. Which is what is happening in above example. One very simple way to find it is to see how many classes are named &quot;Entity&quot; and &quot;EntityService&quot;? If the EntityService operates on a single instance of the Entity like single animal, then&amp;nbsp; you have a problem. Don&#39;t confuse this with the one&#39;s that operate on multiple instances like a &quot;EntityManager&quot; or an &quot;EntityDAO&quot;&lt;br /&gt;
&lt;br /&gt;
So what is really wrong with writing an if else-if&amp;nbsp; and checking instanceof to make decisions? Lets consider that in above example, we added another Animal Cow. Now what can happen is that in our first version of &quot;speak&quot; one can forget to go and add code for a Cow. This is perfectly fine, code compiles! We have implemented the Animal interface but there are no complains. This would only lead to either runtime failure or no failure at all! which ultimately leads to bugs. Think about a larger project where the references are at a lot of places. If the &quot;speak&quot; method is at the level of Animal interface, you have no choice but to implement this method (God help people who will still keep it empty)&lt;br /&gt;
&lt;br /&gt;
Which brings me to my Rule 2: &lt;b&gt;&lt;i&gt;&quot;Compilation Failure is the best failure!&quot;&lt;/i&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/5082236743345955164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/5082236743345955164' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5082236743345955164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5082236743345955164'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/07/compilation-failure-is-best-failure.html' title='Compilation Failure is the best Failure!'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-6713106960882352596</id><published>2010-05-04T06:23:00.000-07:00</published><updated>2010-05-04T06:23:47.750-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gnome"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Printer in Ubuntu &quot;Cannot prompt for Authorization&quot;</title><content type='html'>I was seeing this issue since loong time but never really got to the crux of it. After getting extremely annoyed with this message after every time I tried printing something from a GTK app, I finally decided to solve this problem. Interestingly this problem does not come for Qt (KDE) apps. Only GTK (Gnome) applications are affected.&lt;br /&gt;
&lt;br /&gt;
I found a solution in this post&amp;nbsp;&lt;a href=&quot;http://ubuntuforums.org/archive/index.php/t-829706.html&quot;&gt;http://ubuntuforums.org/archive/index.php/t-829706.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Simple solution for this problem is to copy your printer. That will create a new copy of the existing configured printer. Now just print using the newly created printer. Everything works now!!&lt;br /&gt;
&lt;br /&gt;
Don&#39;t ask me how!!!</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/6713106960882352596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/6713106960882352596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6713106960882352596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6713106960882352596'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/05/printer-in-ubuntu-cannot-prompt-for.html' title='Printer in Ubuntu &quot;Cannot prompt for Authorization&quot;'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-6929310714025652280</id><published>2010-04-24T00:25:00.000-07:00</published><updated>2010-04-24T00:34:58.144-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="java.io"/><title type='text'>Myth about InputStream.read(byte [], int, int) method</title><content type='html'>I know it may sound stupid but only yesterday I discovered that&lt;br /&gt;
&lt;blockquote&gt;InputStream.read(byte [] data, int offset, int length)&amp;nbsp;&lt;/blockquote&gt;method can end up reading lesser number of bytes than length.&lt;br /&gt;
&lt;br /&gt;
What that means is if you are doing something like,&lt;br /&gt;
&lt;blockquote&gt;InputStream in = getInputStream(); // getting it from somewhere..&lt;br /&gt;
byte data = new byte[10];&lt;br /&gt;
int read = in.read(data, 0, data.length);&lt;br /&gt;
System.out.println(&quot;Bytes read: &quot; + read);&lt;/blockquote&gt;The you cannot gurantee that in.read() call will read 10 bytes even when the stream is connected / not broken (applicable particularly in sockets). My understanding was that if it ever returns lesser bytes than lenght, then the channel us broken and we should assume that connection is dropped from counter-party.&lt;br /&gt;
&lt;br /&gt;
There is good explanation in &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#read%28byte%5B%5D,%20int,%20int%29&quot;&gt;javadocs&lt;/a&gt; about this method. The default implementation of this method at the level of &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html&quot;&gt;InputStream&lt;/a&gt; class does this,&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;It tries to read the first byte from the stream. If the read fails due to any other reason other than end of stream, then IOException is thrown. If end of stream is detected, -1 is returned.&lt;/li&gt;
&lt;li&gt;After the first read, if any of the subsequent read throws and IOException, It is swallowed and end of stream is assumed and the number of bytes read until this point are returned. If any of the subsequent reads detects end of stream, again whaterver bytes are read are returned.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;The javadoc also suggests the extensions of &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#read%28byte%5B%5D,%20int,%20int%29&quot;&gt;InputStream&lt;/a&gt; to provide a better implementation of this method. In SocketInputStream (not public in java api) which is what I was dealing with, read(byte [] data, int offset, int length) call delegates to a native method.&lt;br /&gt;
&lt;br /&gt;
So out of my curiosity, I wrote a sample where I had a ServerSocket as a produces producing 2 bytes and waiting for 1 second. And a consumer using Socket which would attempt to read 4 bytes at a time without waiting.&amp;nbsp; The problem was easily reproduced and I could see my every read call in consumer only reading 2 bytes at a time.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/&quot;&gt;BufferedInputStream&lt;/a&gt; provides a more convinient implementation of the read method. It repeatedly invkoes the multibyte read method on the underlying stream until&lt;br /&gt;
&lt;ol&gt;&lt;li&gt; Length number of bytes are read&lt;/li&gt;
&lt;li&gt;End of stream is reached&lt;/li&gt;
&lt;li&gt;Subsequent call to read will block. This is identified by calling available method on the stream.&lt;/li&gt;
&lt;/ol&gt;But note the point 3, it still does not gurantee that it will always return length number of bytes unless end of stream is reached.&lt;br /&gt;
&lt;br /&gt;
In my case our SocketInputStream was wrapped in the BufferedInputStream, which relatively shielded us from this problem but it aggrevated the problem as we saw this problem very rarely. Only after some code review is what we identified this issue.&lt;br /&gt;
&lt;br /&gt;
Now a few questions in your mind maybe why call the multibyte read? why not just keep calling single byte read and track how many bytes we read? One of the grey hair in my company answered this question saying,&amp;nbsp; &lt;br /&gt;
&lt;blockquote&gt;Whe we use to do it in C, the multibyte read made sure that there were fewer stack pushes and pops as we would end up doing fewer read calls.&amp;nbsp; &lt;/blockquote&gt;I havent personally measured the performance gain by using multibyte read but Ithink it never hurts using it if you understand how it works.&lt;br /&gt;
&lt;br /&gt;
So when does the multibyte read call wait then? Since it is capable of returing lesser bytes than requested, it can always just return with lesser data. My guess is that it will only block when there are 0 bytes avaialble to read. In a way multibyte read call will never return 0, as it will make an attempt to read at least one byte.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/6929310714025652280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/6929310714025652280' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6929310714025652280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6929310714025652280'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/04/myth-about-inputstreamreadbyte-int-int.html' title='Myth about InputStream.read(byte [], int, int) method'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-8241436005804733802</id><published>2010-04-09T22:40:00.000-07:00</published><updated>2010-04-23T23:41:01.624-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ESB"/><category scheme="http://www.blogger.com/atom/ns#" term="GlassfishESB"/><category scheme="http://www.blogger.com/atom/ns#" term="ServiceMix"/><title type='text'>Good comparison of OpenESB and ServiceMix</title><content type='html'>This &lt;a href=&quot;http://www.predic8.com/openesb-servicemix-comparison.htm&quot;&gt;link&lt;/a&gt; gives very good comparison between &lt;a href=&quot;https://open-esb.dev.java.net/&quot;&gt;OpenESB&lt;/a&gt; and &lt;a href=&quot;http://servicemix.apache.org/&quot;&gt;ServiceMix&lt;/a&gt; ESBs</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/8241436005804733802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/8241436005804733802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/8241436005804733802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/8241436005804733802'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/04/good-comparison-of-openesb-and.html' title='Good comparison of OpenESB and ServiceMix'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-5594382274709682692</id><published>2010-04-06T01:57:00.000-07:00</published><updated>2010-04-20T10:41:16.832-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ant"/><category scheme="http://www.blogger.com/atom/ns#" term="bzip"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="tar"/><title type='text'>Quick way to untar and bunzip files in java</title><content type='html'>Have you ever felt a need to deal with bzip2 compressed tarballs in Java? Recently I compressed a lot of test resources in our source tree using bzip2 compression. The resources were static and were meant to change very rarely. bzip2 was the best choice in terms of amount of compression. What it also meant was my SVN download of the source tree would take much lower time. I planned to extract the resources and make them available at runtime while running tests.&lt;br /&gt;
&lt;br /&gt;
If you already know, there is no way to handle bzip compression in Java core API. But at the back of my mind I knew that you can create bzipped tarballs using Ant. So I looked at the Ant tasks and figured that there was untar task which can be instructed to also process it through bzip2 uncompression.&lt;br /&gt;
&lt;br /&gt;
Here is the code snippet that can untar and bunzip the file using Java code.&lt;br /&gt;
&lt;blockquote&gt;Untar untar = new Untar();&lt;br /&gt;
untar.setSrc(new File(&quot;./src/test/resources/files.tar.bz2&quot;));&lt;br /&gt;
untar.setDest(new File(&quot;./target&quot;));&lt;br /&gt;
UntarCompressionMethod compression = new UntarCompressionMethod();&lt;br /&gt;
compression.setValue(&quot;bzip2&quot;);&lt;br /&gt;
untar.setCompression(compression);&lt;br /&gt;
untar.setOverwrite(true);&lt;br /&gt;
untar.execute();&lt;/blockquote&gt;&lt;br /&gt;
Also make sure that you put ant jar on the classpath.&lt;br /&gt;
&lt;br /&gt;
Maven users can simply add following dependency,&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.ant&amp;lt;/groupId&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;ant&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;1.7.0&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;
&amp;lt;/dependency&amp;gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/5594382274709682692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/5594382274709682692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5594382274709682692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5594382274709682692'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/04/quick-way-to-untar-and-bunzip-files-in.html' title='Quick way to untar and bunzip files in java'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-3041937700776256970</id><published>2010-04-04T23:11:00.000-07:00</published><updated>2010-04-04T23:13:03.568-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="junit"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>Disabling test under JUnit 4.4</title><content type='html'>Recently I had to disable a unit test in our test system. We use &lt;a href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt; as our build tool and &lt;a href=&quot;http://www.junit.org/&quot;&gt;JUnit 4.4&lt;/a&gt; for unit testing. I had a few options, &lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Exclude that particular class from tests under surefire plugins configuration in my pom.xml&lt;/li&gt;
&lt;li&gt;Remove &lt;a href=&quot;http://kentbeck.github.com/junit/javadoc/latest/org/junit/Test.html&quot;&gt;@Test&lt;/a&gt; annotation from test method in the test class. Which fails as it finds a Test class but does not find any test methods&lt;/li&gt;
&lt;li&gt;Rename the class from say MyTest to something that does not end with &quot;Test&quot; say &quot;Tezt&quot;&lt;/li&gt;
&lt;/ol&gt;I remembered that in &lt;span id=&quot;goog_1257325670&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://www.blogger.com/&quot;&gt;TestNG&lt;span id=&quot;goog_1257325671&quot;&gt;&lt;/span&gt;&lt;/a&gt; you can just disable a test by saying &lt;i&gt;@Test (enable = false)&lt;/i&gt; and I was desperately trying to find how to do this in JUnit 4.4. But to my dissappointment Test annotation only allows a couple of attributes, timeout and expected which did not do what I want.&lt;br /&gt;
&lt;br /&gt;
After looking at the JUnit javadocs, I stumbled upon an annotation &lt;a href=&quot;http://kentbeck.github.com/junit/javadoc/latest/org/junit/Ignore.html&quot;&gt;@Ignore&lt;/a&gt; it is indeed an annotation to be used if you want to skip the test.&lt;br /&gt;
&lt;br /&gt;
So if you want to disable your test case in JUnit 4.4 just annotate your test methond with &lt;b&gt;&lt;i&gt;@Ignore @Test&lt;/i&gt;&lt;/b&gt; annotations.&lt;br /&gt;
&lt;br /&gt;
What it also did was that Maven started reposting one test as being &quot;&lt;b&gt;Skipped&lt;/b&gt;&quot; which is nicer as it keeps reminding you that you need to look after the test that you have disabled.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/3041937700776256970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/3041937700776256970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3041937700776256970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3041937700776256970'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/04/disabling-test-under-junit-44.html' title='Disabling test under JUnit 4.4'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-6264124892676348883</id><published>2010-03-29T22:00:00.000-07:00</published><updated>2010-03-29T22:00:30.094-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="thunderbird"/><title type='text'>Wow! Thunderbird now reminds me to attach the file</title><content type='html'>&lt;a href=&quot;http://www.mozillamessaging.com/en-US/thunderbird/&quot;&gt;Thunderbird 3.0.3&lt;/a&gt; introduces a great feature that reminds you to attach a document in case you type words like &quot;attaching&quot; in your email. It scans through the matter of the composed email finds relevant word that may indicate that you may want to attach some file. Here is a screenshot.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0VfLn1ajy1ginX9jhrFEgY8BUZKJF0n8kyYGBYNN6QTC-FSNmJWuSkcEjF9N0ufFnF72mJk8woklpLcEJXm9r9KphJ5QT9UA5lHPaxsWaZiMtvs9gYtjUjCG4VkGByAXhbncSQQ/s1600/thunderbird-compose.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0VfLn1ajy1ginX9jhrFEgY8BUZKJF0n8kyYGBYNN6QTC-FSNmJWuSkcEjF9N0ufFnF72mJk8woklpLcEJXm9r9KphJ5QT9UA5lHPaxsWaZiMtvs9gYtjUjCG4VkGByAXhbncSQQ/s320/thunderbird-compose.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/6264124892676348883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/6264124892676348883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6264124892676348883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6264124892676348883'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/03/wow-thunderbird-now-reminds-me-to.html' title='Wow! Thunderbird now reminds me to attach the file'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0VfLn1ajy1ginX9jhrFEgY8BUZKJF0n8kyYGBYNN6QTC-FSNmJWuSkcEjF9N0ufFnF72mJk8woklpLcEJXm9r9KphJ5QT9UA5lHPaxsWaZiMtvs9gYtjUjCG4VkGByAXhbncSQQ/s72-c/thunderbird-compose.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-8774729849336830861</id><published>2010-03-24T21:40:00.000-07:00</published><updated>2010-03-24T21:40:45.948-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="thunderbird"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Thunderbird 3.0.3 migration</title><content type='html'>I recently migrated to &lt;a href=&quot;http://www.mozillamessaging.com/en-US/thunderbird/&quot;&gt;Thunderbird 3.0.3&lt;/a&gt; There is a specific problem with Thunderbird that I have seen at times. Ever faced a problem of loosing your mail data and accounts after migrating to new Thunderbird? Thunderbird stores data under directory named &lt;b&gt;.thunderbird&lt;/b&gt; in your home. But maybe just in Ubuntu or some versions of Thunderbird store it under directory named &lt;b&gt;.mozilla-thunderbird&lt;/b&gt;. So&amp;nbsp; if after installing a new Thunnderbird and restarting it, if you are not able to see your e-mails, it might well be the problem of directory names.&lt;br /&gt;
&lt;br /&gt;
To resolve, try renaming the directory (Whatever applies to you),&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;gt; mv .mozilla-thunderbird .thunderbird&lt;/i&gt; &lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&lt;i&gt; mv .thunderbird .mozilla-thunderbird&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Restart your Thunderbird and now you should be able to see your e-mails.&lt;br /&gt;
&lt;br /&gt;
I have mostly seen this problem&amp;nbsp; when I install Thunderbird externally i.e. not through package manager. By installing I mean simply extracting it to /opt and not doing &quot;./configure make install&quot;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/8774729849336830861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/8774729849336830861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/8774729849336830861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/8774729849336830861'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/03/thunderbird-303-migration.html' title='Thunderbird 3.0.3 migration'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-4392782406265959278</id><published>2010-02-27T09:12:00.000-08:00</published><updated>2010-02-27T09:12:59.429-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="flex"/><category scheme="http://www.blogger.com/atom/ns#" term="html 5"/><category scheme="http://www.blogger.com/atom/ns#" term="pivot"/><category scheme="http://www.blogger.com/atom/ns#" term="ria"/><title type='text'>RIA frameworks and HTML 5</title><content type='html'>Recently when Steve Jobs wrote off Adobe Flash support in iPad, I went ahead and read more about HTML 5.0 and I am convinced that once HTML 5.0&amp;nbsp; is out, there will be no need of the fancy RIA frameworks like Apache Pivot and Adobe Flex.&lt;br /&gt;
&lt;br /&gt;
HTML 5.0 introduces everything from videos, audio as well as shapes as part of the specification (introduces tags &lt;audio&gt; &lt;video&gt;). In my opinion only issue with HTML 5.0 will be time required for browsers to support it. Content like video and audio will be difficult to support for open source browers like Firefox as most of the codecs are not open sourced.&lt;/video&gt;&lt;/audio&gt;&lt;br /&gt;
&lt;br /&gt;
But indeed HTML 5.0 is the future. If you are planning to develop your products based on Adobe Flex or Apache Pivot then think twice.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/4392782406265959278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/4392782406265959278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/4392782406265959278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/4392782406265959278'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/02/ria-frameworks-and-html-5.html' title='RIA frameworks and HTML 5'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-4107484685630479568</id><published>2010-02-11T20:21:00.000-08:00</published><updated>2010-02-11T20:22:03.205-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blogger"/><category scheme="http://www.blogger.com/atom/ns#" term="twitter"/><title type='text'>Why I like Twitter!</title><content type='html'>With only about 30 odd posts in last 4 years over here, and already about a 35 tweets in a couple of months, I really have started liking twitter. I ask myself why did I not blog so much? Answer is simple, everytime I tried to write a blog entry, I never had a restriction of number of words. I always felt as if I needed to fill the space (for no reason) With Twitter its just soo much more easy.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/4107484685630479568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/4107484685630479568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/4107484685630479568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/4107484685630479568'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/02/why-i-like-twitter.html' title='Why I like Twitter!'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-3329846945362845824</id><published>2010-02-05T07:06:00.000-08:00</published><updated>2010-02-05T07:07:56.447-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="api"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><category scheme="http://www.blogger.com/atom/ns#" term="maven plugins"/><title type='text'>Animal Sniffer Maven Plugin</title><content type='html'>While looking at the Maven plugins at Codehaus, I just stumbled upon a maven plugin named &lt;a href=&quot;http://mojo.codehaus.org/animal-sniffer/&quot;&gt;Animal Sniffer&lt;/a&gt;. This plugin could be a great tool for people working on frameworks where API&#39;s are published to the user. There is always a problem of API loosing the compatibility across versions (for eg. making some method final looses backward compatibility). These kind of problems are very very difficult to trap.&lt;br /&gt;
&lt;br /&gt;
I wanted to evaluate this plugin for instrumenting our internal API against which following versions can check compatibility. Firstly I am not sure if Animal Sniffer can be used in this way but I believe it could be.&lt;br /&gt;
&lt;br /&gt;
I tried to play with the plugin a little where I figured out that vresion 1.5-SNAPSHOT cannot be downloaded from the Codehaus snapshot repository and older versions 1.4, 1.3 encounter an NPE when I run animal-sniffer:build goal.&lt;br /&gt;
&lt;br /&gt;
Does anyone have experience with Animal Sniffer?</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/3329846945362845824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/3329846945362845824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3329846945362845824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3329846945362845824'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/02/animal-sniffer-maven-plugin.html' title='Animal Sniffer Maven Plugin'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-3914860084946038273</id><published>2010-02-03T03:13:00.000-08:00</published><updated>2010-02-03T03:17:34.687-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="flex"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="pivot"/><category scheme="http://www.blogger.com/atom/ns#" term="ria"/><category scheme="http://www.blogger.com/atom/ns#" term="silverlight"/><title type='text'>Apache Pivot, Platform for building Rich Internet Appplications</title><content type='html'>Apache &lt;a href=&quot;http://pivot.apache.org/&quot;&gt;Pivot&lt;/a&gt; is a framework for building Rich Internet Applications. Pivot seems to have taken inspiration from &lt;a href=&quot;http://www.adobe.com/products/flex/&quot;&gt;Flex&lt;/a&gt; and &lt;a href=&quot;http://silverlight.net/&quot;&gt;Silverlight&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is a snippet of overview from Pivot website,&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;&quot;Pivot applications are written using a combination of Java and XML and can be                     run either as an applet or as a standalone (optionally offline) desktop                     application. Pivot includes features that make building modern GUI applications                     much easier, including declarative UI, data binding, effects and transitions,                     and web services integration.&quot;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;I would personally choose Pivot over Flex or Silverlight as it is easier to integrate builds into Continuous Integration and Maven. Not sure where Pivot will head to but it surely seems a promising technology.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/3914860084946038273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/3914860084946038273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3914860084946038273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3914860084946038273'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/02/apache-pivot-platform-for-building-rich.html' title='Apache Pivot, Platform for building Rich Internet Appplications'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-1755036083039387353</id><published>2010-01-06T06:10:00.000-08:00</published><updated>2010-01-06T06:15:29.537-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="log4j"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>Log4j 1.2.15 with Maven</title><content type='html'>I had a problem with Log4j version 1.2.15 where after adding a Log4j dependency, maven would try to download dependencies like java mail, jmx etc. The download never seem to finish as it is from some external repository. I am not sure if it was a temporary problem. I figured the problem was version 1.2.15 when I looked at the pom of that version and I could see some dependencies with specific repository.&lt;br /&gt;&lt;br /&gt;Migrating to version 1.2.14 seem to fix this problem.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/1755036083039387353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/1755036083039387353' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/1755036083039387353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/1755036083039387353'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2010/01/log4j-1215-with-maven.html' title='Log4j 1.2.15 with Maven'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-5583459678753187828</id><published>2009-12-29T07:00:00.000-08:00</published><updated>2009-12-29T07:24:12.734-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="reiserfs"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu crash"/><title type='text'>How I tricked my Ubuntu</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;My Ubunut was giving me problems starting up yesterday. After investigating for a while, I figured that it was due to corrupt reiserfs on /var So I set to fix the problem by running &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;reiserfsch --check&lt;/span&gt; on my /var partition. I rebooted Ubuntu in &lt;span style=&quot;font-weight: bold;&quot;&gt;Recovery Mode&lt;/span&gt;. To My surprise, I could not do fsck on my /var as it was mounted and some applications seemed to be using it. I always thought that Recovery Mode does not boot the installed kernel instead it boots an alternate image. This was merely a misconception.&lt;br /&gt;&lt;br /&gt;Now with no Ubuntu live CD I could virtually not solve the problem! So I thought about tricking my Ubuntu. I edited my &lt;span style=&quot;font-weight: bold;&quot;&gt;/var/fstab&lt;/span&gt;, commented out the mount /var and rebooted my machine. Now the /var was not mounted and I could run fsck on that partition. Some applications did complain about missing files etc. but it at least allowed me to run fsck on my /var partition. After fixing problems by doing &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;reiserfsck --rebuild-tree&lt;/span&gt; I removed the commented line from fstab, mounted /var and switched to runlevel 5 and my Ubuntu is back fixed again&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/5583459678753187828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/5583459678753187828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5583459678753187828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5583459678753187828'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/12/how-i-tricked-my-ubuntu.html' title='How I tricked my Ubuntu'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-6189081951872542665</id><published>2009-12-03T05:17:00.000-08:00</published><updated>2009-12-03T05:22:56.820-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fat jar"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><category scheme="http://www.blogger.com/atom/ns#" term="one jar"/><title type='text'>Runnable jar using maven assembly plugin</title><content type='html'>I faced a nagging problem of not able to create a runnable jar using Maven assembly plugin. I had a couple of dependencies which were required at runtime. I used the jar-with-dependecies assembly to achieve this. But my Main-Class attribute from the MANIFEST.MF was lost every time.&lt;br /&gt;&lt;br /&gt;The solution to this problem is archive configuration under assembly plugin as described &lt;a href=&quot;http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/&quot;&gt;here&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/6189081951872542665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/6189081951872542665' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6189081951872542665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/6189081951872542665'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/12/runnable-jar-using-maven-assembly.html' title='Runnable jar using maven assembly plugin'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-7979774268028455223</id><published>2009-10-09T07:39:00.000-07:00</published><updated>2009-10-09T07:48:21.912-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gnome"/><category scheme="http://www.blogger.com/atom/ns#" term="kde"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>One thing I miss from KDE</title><content type='html'>About 6 months back I migrated to Ubuntu from OpenSUSE. I explicitly did not choose Kubunut as I did not really like KDE 4. It actually sucked! Before that my default window manager was always KDE and I thought about GNOME being lame. But not anymore!&lt;br /&gt;&lt;br /&gt;There were a number of things that I missed from KDE most of which had alternatives in GNOME. But I still miss the cool feature of KDE where you could just open the &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Run Dialogue&quot;&lt;/span&gt; (Alt + F2) and use it as a simple calculator. You could say type &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;2*2&quot;&lt;/span&gt; and press enter. It would do the calculation and show you the output instead of starting any application.&lt;br /&gt;&lt;br /&gt;Havent found an alternative to that yet in GNOME!</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/7979774268028455223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/7979774268028455223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/7979774268028455223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/7979774268028455223'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/10/one-thing-i-miss-from-kde.html' title='One thing I miss from KDE'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-9196601021729137774</id><published>2009-10-09T02:50:00.001-07:00</published><updated>2009-10-09T03:19:55.415-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java coding conventions"/><title type='text'>Common we are in 2009! Use an IDE!!</title><content type='html'>I have seen a number of people using a naming convention of prefixing letter &lt;span style=&quot;font-weight: bold;&quot;&gt;&#39;I&#39;&lt;/span&gt; to names of any interfaces in Java like &lt;span style=&quot;font-weight: bold;&quot;&gt;IHuman&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;IMonster&lt;/span&gt;. This was a very famous and essential practice about a couple of decades ago (I believe. Not that I am soo old!) I remember reading about prefixes like &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;lpstr&quot;&lt;/span&gt; indicating that it is a &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Long Pointer to the String&quot;&lt;/span&gt;. But all this was followed in C and C++. It was important at that time since the languages were not type safe and there were no mature IDE&#39;s. It would be easier to recognize that this pointer is to this this type of variable etc. which would prevent a lot of silly mistakes too. &lt;a href=&quot;http://weblogs.asp.net/rosherove/archive/2006/06/14/InterfaceNamingAnythingButJavasStandardPlease.aspx&quot;&gt;Seems like a few people with inclination towards Microsoft standards in .Net still like it and recommend it&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Personally I think we are in year 2009, I use IDE (Eclipse) for development and I have never needed to really see &#39;I&#39; prefixed to an interface. It adds very less value. Only thing you can accidently end up doing is say do &lt;span style=&quot;font-weight: bold;&quot;&gt;new Interface();&lt;/span&gt; but your IDE will complain the very next moment anyway. I can always see what methods I can call by simply typing &#39;.&#39; In case I have any doubts. I generally use F4 to see hierarchy which will clearly show me that it is an Interface by coloring it purlple or I would directly F3 to get into code to see whats there.&lt;br /&gt;&lt;br /&gt;People who still follow this beautiful practice, I am sorry but I absolutely hate it! for others, keep your &lt;span style=&quot;font-weight: bold;&quot;&gt;Alt + Shift + R&lt;/span&gt; ready ;)</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/9196601021729137774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/9196601021729137774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/9196601021729137774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/9196601021729137774'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/10/common-we-are-in-2009-use-ide.html' title='Common we are in 2009! Use an IDE!!'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-7491752801079674335</id><published>2009-10-06T23:01:00.001-07:00</published><updated>2009-10-09T05:07:54.732-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>Environmental variables, Maven and Eclipse</title><content type='html'>If you use &lt;a href=&quot;http://m2eclipse.sonatype.org/&quot;&gt;m2eclipse&lt;/a&gt; for building &lt;a href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt; projects in &lt;a href=&quot;http://www.eclipse.org/&quot;&gt;Eclipse&lt;/a&gt;, there are some issues while building projects having variables defined which refer Environmental Variables.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;appserver.home&amp;gt;&lt;/span&gt;${env.APPSERVER_HOME}&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;/appserver.home&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Some of our developers came out with an idea of replacing the value locally to point to the directory on their machine like&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;appserver.home&amp;gt;&lt;/span&gt;/home/developer/software/appserver/&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;/appserver.home&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;This lead to numerous incidents where developers checked in the hard coded path for this variable in our code repository, which lead to failed builds on our &lt;a href=&quot;https://hudson.dev.java.net/&quot;&gt;Hudson&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;A better way to manage this is using profiles. You can create a profile in your &lt;span style=&quot;font-weight: bold;&quot;&gt;settings.xml&lt;/span&gt; which resides under .m2 directory in your home directory on Linux (not sure where on Windows). Example profile configuration is as follows,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;profiles&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;     &amp;lt;profile&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;          &amp;lt;id&amp;gt;&lt;/span&gt;eclipse&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;          &amp;lt;properties&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;                &amp;lt;appserver.home&amp;gt;&lt;/span&gt;/home/developer/software/appserver&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&amp;lt;/appserver.home&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;          &amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;     &amp;lt;/profile&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt; &amp;lt;/profiles&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now you have a profile named eclipse which points to the absolute path for the varialbe &lt;span style=&quot;font-weight: bold;&quot;&gt;appserver.home.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now checking out / importing a maven project you can specify profile as eclipse. Or in an already checked out Maven project (note that the project needs to be checked out as Maven Project. Same thing will not work on simple java projects even if they use maven),  &lt;span style=&quot;font-weight: bold;&quot;&gt;go to project properties -&gt; Maven &lt;/span&gt;and set the profile to &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;eclipse&quot;&lt;/span&gt; (the same as id parameter in your settings.xml)&lt;br /&gt;&lt;br /&gt;Now what this does is when you make build from eclipse, it uses the profile &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;eclipse&quot;&lt;/span&gt; and resolves the variable to the right value. Advantage of this approach is that you do not need to change pom.xml of the project so it avoids the problem of checking in the hard coded values by mistake.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/7491752801079674335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/7491752801079674335' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/7491752801079674335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/7491752801079674335'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/10/environmental-variables-maven-and.html' title='Environmental variables, Maven and Eclipse'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-7607536017810261800</id><published>2009-10-06T09:18:00.000-07:00</published><updated>2009-10-06T09:30:23.791-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openoffice"/><title type='text'>Spell check under Openoffice</title><content type='html'>Are you unable to do auto spell check in the OpenOffice applications? To make it work, you need to go to the application (oowriter, oocalc etc) menu, go to &lt;span style=&quot;font-weight: bold;&quot;&gt;Tools -&gt; Options -&gt; Language Settings -&gt; Languages&lt;/span&gt; and set the &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Default language for the documents&quot;&lt;/span&gt; to something standard. In my case &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;English (USA)&quot;&lt;/span&gt; just worked fine.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/7607536017810261800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/7607536017810261800' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/7607536017810261800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/7607536017810261800'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/10/spell-check-under-openoffice.html' title='Spell check under Openoffice'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-3119412245318740692</id><published>2009-10-02T10:23:00.000-07:00</published><updated>2009-10-06T22:18:25.267-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="netconnect"/><category scheme="http://www.blogger.com/atom/ns#" term="reliance"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Reliance Netconnect on Ubuntu</title><content type='html'>I am absolutely delighted as I write this post. I am using Reliance Netconnect on my Ubunut 9.04.&lt;br /&gt;&lt;br /&gt;And if you are under impression that it was achieved after hours of googling, trial and error and after running hundreds of commands, then you are wrong.&lt;br /&gt;&lt;br /&gt;To get it working,&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Plug in the dongle.&lt;/li&gt;&lt;li&gt;Wait till the network manager applet menu shows &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Auto Mobile Broadband (CDMA) connection&quot;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Best way to make it work is to select the &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Auto Mobile Broadband (CDMA) connection&quot;&lt;/span&gt; and let it figure out the settings&lt;/li&gt;&lt;li&gt;After step 4, it tries to establish connection but obviously fails since the user and password are not provided&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now, right click on the network manager applet and select edit connections.&lt;/li&gt;&lt;li&gt;Go to &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Mobile Broadband&quot;&lt;/span&gt; tab&lt;/li&gt;&lt;li&gt;Now there is already a configuration created named &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Auto Mobile Broadband (CDMA) connection&quot;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Edit that configuration and add your user name and password.&lt;/li&gt;&lt;li&gt;Now connect like in step 8 by clicking on Network manager applet and selecting the &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;Auto Mobile Broadband (CDMA) connection&quot;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Enjoy high speed mobile broadband on Ubuntu!&lt;/li&gt;&lt;/ol&gt;I am sure that same procedure will work with any latest mature Linux distribution. There could be issues bootstrapping the hardware but once its detected, NetworkManager will just work fine.</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/3119412245318740692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/3119412245318740692' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3119412245318740692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3119412245318740692'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/10/reliance-netconnect-on-ubuntu.html' title='Reliance Netconnect on Ubuntu'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-525333831416914979</id><published>2009-04-14T10:36:00.000-07:00</published><updated>2009-10-06T09:26:50.907-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="xubuntu"/><title type='text'>Annoying system beep under Xubuntu 8.10</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;If you face a problem of getting an annoying system beep at startup / shutdow and any other actions under xubuntu 8.10, the only solution is to blacklist the pcspkr module.&lt;br /&gt;&lt;br /&gt;edit the &lt;span style=&quot;font-weight: bold;&quot;&gt;/etc/modprobe.d/blacklist&lt;/span&gt; file as &lt;span style=&quot;font-weight: bold;&quot;&gt;root&lt;/span&gt; (sudo) and add line,&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;blacklist pcspkr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Although the changes will apply only after you reboot the machine, you can do&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;sudo modprobe -r pcspkr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will remove the &lt;span style=&quot;font-weight: bold;&quot;&gt;pcspkr&lt;/span&gt; module and disable the annoying sound&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/525333831416914979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/525333831416914979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/525333831416914979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/525333831416914979'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/04/annoying-system-beep-under-xubuntu-810.html' title='Annoying system beep under Xubuntu 8.10'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-1614037238034936054</id><published>2009-04-12T15:51:00.000-07:00</published><updated>2009-04-12T18:59:22.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="thunderbird"/><title type='text'>Setting default alarm for events in Lightning (Thunderbird Calendar)</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;With new Lightning version 0.9, I had started facing a problem where if an event was created or sent to me by someone, which did not have default alarm set, there wont be any alarm going off before the event.&lt;br /&gt;&lt;br /&gt;It was probably my sheer laziness that I never really looked for an option for this, If you are facing a same problem here is how to fix it,&lt;br /&gt;&lt;br /&gt;go to &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Edit&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; -&gt; &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Preferences&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; -&gt; &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Lightning&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; -&gt; &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Alarms&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  and set the &quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Default alarm setting for events&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&quot; to &quot;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;On&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/1614037238034936054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/1614037238034936054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/1614037238034936054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/1614037238034936054'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/04/setting-default-alarm-for-events-in.html' title='Setting default alarm for events in Lightning (Thunderbird Calendar)'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-3957788735624670208</id><published>2009-04-12T15:44:00.000-07:00</published><updated>2009-10-06T09:27:16.640-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="thunderbird"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Problems with Thunderbird calendar after Thunderbird upgrade</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;If you are not able to see the calendar data after upgrading your Thunderbird, specially after upgrading your linux version, the problem can be solved by installing libstdc++5.&lt;br /&gt;&lt;br /&gt;I recently upgraded to Xubuntu 8.10 from OpenSUSE 10.3 (late but worth it) and after importing my mail data, I could not see the calendar. The Thunderbird version I used before was 2.0.0.6 and the new version was 2.0.0.17. I tried installing the lower version (in /opt keeping the prebuild version) and it complained to start. It complained about missing libstdc++5.so after I installed that (&lt;span style=&quot;font-weight: bold;&quot;&gt;sudo apt-get install libstdc++5&lt;/span&gt;) all worked fine.&lt;br /&gt;&lt;br /&gt;After a bit of googling that the problem with latest version is that it is dependant on libstdc++6 whereas the calendar plugin is dependant on libstdc++5 (I am using Lightning version 0.9 which presumably is the latest)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/3957788735624670208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/3957788735624670208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3957788735624670208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/3957788735624670208'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/04/problems-with-thunderbird-calendar.html' title='Problems with Thunderbird calendar after Thunderbird upgrade'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-8035201815692304164</id><published>2009-02-06T04:17:00.000-08:00</published><updated>2009-10-06T09:27:34.722-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><title type='text'>Time measurement accuracy in Java</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;An interesting article about time measurement under Java&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.simongbrown.com/blog/2007/08/20/millisecond_accuracy_in_java.html&quot;&gt;http://www.simongbrown.com/blog/2007/08/20/millisecond_accuracy_in_java.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Beware if you are doing any performance measurements on Windows.&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/8035201815692304164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/8035201815692304164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/8035201815692304164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/8035201815692304164'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/02/time-measurement-accuracy-in-java.html' title='Time measurement accuracy in Java'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20262156.post-5086104868432844667</id><published>2009-01-09T04:24:00.000-08:00</published><updated>2009-04-12T19:00:55.287-07:00</updated><title type='text'>java.library.path and LD_LIBRARY_PATH</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;As everyone might know, you have to set the &lt;span style=&quot;font-weight: bold;&quot;&gt;java.library.path&lt;/span&gt; system property for making sure that you can load some JNI libraries in your java application. But often it wont be enough for you to specify &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;java.library.path&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;. The libraries which are referencing other shared libraries, would depend on standard way to resolve the libraries. Which means that if you have a &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;foo.so&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; which you are trying to load in your Java application, and &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;foo.so&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; references or is dynamically linked to &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;bar.so&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;foo.so&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; will look for the &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;bar.so&lt;/span&gt; using the &lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;LD_LIBRARY_PATH&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;java.library.path&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; only works to resolve the immidiate native library that you are loading in your code. Loading of the other dependent libraries is left to the first library. The JNI library that you load will rely on the OS dependent way to resolve its references.&lt;br /&gt;&lt;br /&gt;The catch is that, you will have to provide both &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;java.library.path&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; and &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;LD_LIBRARY_PATH&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; in such case for the libraries to load successfully. So its reliable to depend on the OS dependent way (&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;LD_LIBRARY_PATH&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;) of loading library files than &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;java.library.path&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; system property.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalblogs.blogspot.com/feeds/5086104868432844667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/20262156/5086104868432844667' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5086104868432844667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20262156/posts/default/5086104868432844667'/><link rel='alternate' type='text/html' href='http://kalblogs.blogspot.com/2009/01/java.html' title='java.library.path and LD_LIBRARY_PATH'/><author><name>Kalpak</name><uri>http://www.blogger.com/profile/01919265414405767640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>