<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Java on Saleem Ansari</title>
    <link>/tags/java/</link>
    <description>Recent content in Java on Saleem Ansari</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>(c) 2024 Saleem Ansari</copyright>
    <lastBuildDate>Wed, 17 Apr 2013 00:00:00 +0000</lastBuildDate>
    <atom:link href="/tags/java/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Understanding big Lucene index by inspecting a portion of it</title>
      <link>/2013/04/17/understanding-big-lucene-index-by-inspecting-a-portion-of-it/</link>
      <pubDate>Wed, 17 Apr 2013 00:00:00 +0000</pubDate>
      <guid>/2013/04/17/understanding-big-lucene-index-by-inspecting-a-portion-of-it/</guid>
      <description>I was wondering if I could get a sample out of many huge Lucene indexes and inspect them with Lukeall on my machine. I quickly realized, that copying such indexes over network would be time consuming.&#xA;First I googled for a ready-made solution so that I could copy on a few documents from the whole index into a separate ( small ) index. That way I could quickly understand the document structure.</description>
    </item>
    <item>
      <title>JCallTracer: Tool to generate Sequence Diagrams for Java programs</title>
      <link>/2013/01/06/jcalltracer-tool-to-generate-sequence-diagrams-for-java-programs/</link>
      <pubDate>Sun, 06 Jan 2013 00:00:00 +0000</pubDate>
      <guid>/2013/01/06/jcalltracer-tool-to-generate-sequence-diagrams-for-java-programs/</guid>
      <description>For sometime now I have been working on a project called JCallTracer. I had a simple problem at hand: generate Squence Diagrams for a program written in Java. I did try to google such a tool but I couldn&amp;rsquo;t find anything that was Open Source and worked on Linux. The closest I could find was Java Call Tracer. This tool was designed for Windows users and didn&amp;rsquo;t compile on Linux. I fixed that, but then it was apparently designed for Java programs with small memory foot-print.</description>
    </item>
    <item>
      <title>XML, RSS, ATOM and Java</title>
      <link>/2012/10/03/xml-rss-atom-and-java/</link>
      <pubDate>Wed, 03 Oct 2012 00:00:00 +0000</pubDate>
      <guid>/2012/10/03/xml-rss-atom-and-java/</guid>
      <description>I was searching for ways to generate xml feeds ( ATOM / RSS ) using Java. It appeared to be trivial task but its not. There are so many different libraries in Java which are capable of reading and writing XML in Java that it became a daunting task to evaulate them. After a bit of experimentation I have settled down with JDOM. JDOM is so simple to use.&#xA;On top of that, ROME tools make it even easier to read/write feeds using Java.</description>
    </item>
    <item>
      <title>JUDCon 2012 - an experience!</title>
      <link>/2012/01/27/judcon-2012-an-experience/</link>
      <pubDate>Fri, 27 Jan 2012 00:00:00 +0000</pubDate>
      <guid>/2012/01/27/judcon-2012-an-experience/</guid>
      <description>My first Java exclusive conference!&#xA;I arrived at the venue right on time. Surprize, there were a lot of people already holding their welcome kits. Conference was already running quite smoothly. Wifi worked most of the time. The sessions, lunch, tea were always on time. Actually, there were people assigned to ring bells, just like in schools, to notify timeout during lunch and tea breaks :)&#xA;The whole confenence was revolving around four major topics: JBoss AS7, Infinispan, Drools and OpenShift.</description>
    </item>
    <item>
      <title>Packaging Java JARs as RPM packages</title>
      <link>/2012/01/27/packaging-java-jars-as-rpm-packages/</link>
      <pubDate>Fri, 27 Jan 2012 00:00:00 +0000</pubDate>
      <guid>/2012/01/27/packaging-java-jars-as-rpm-packages/</guid>
      <description>At JUDCon 2012, I had a discussion and argument with Jaikiran Pai and Ravi Maurya on &amp;ldquo;Packaging Java JARs as RPM packages&amp;rdquo;.&#xA;Well it is not just RPM, it could be any package management system ( eg. dpkg, protage etc. ), doesn&amp;rsquo;t matter as long as it serves the purpose of:&#xA;How is all this achieved in Java world? Simple. Just package all the required JARs in a single JAR or WAR or an EAR for that matter.</description>
    </item>
    <item>
      <title>Resolving java.lang.NoClassDefFoundError: java_cup/runtime/lr_parser</title>
      <link>/2010/10/15/resolving-java.lang.noclassdeffounderror-java_cup/runtime/lr_parser/</link>
      <pubDate>Fri, 15 Oct 2010 00:00:00 +0000</pubDate>
      <guid>/2010/10/15/resolving-java.lang.noclassdeffounderror-java_cup/runtime/lr_parser/</guid>
      <description>While building {OpenGrok from source I came across a common error. {OpenGrok also needs JFlex to be present on the classpath as mentioned in the README.TXT file.&#xA;$ sudo yum install jflex $ hg clone ssh://anon@hg.opensolaris.org/hg/opengrok/trunk/ opengrok-dev $ cd opengrok-dev $ CLASSPATH=$CLASSPATH:/usr/share/java/JFlex.jar Compilation failed giving the following error.&#xA;BUILD FAILED java.lang.NoClassDefFoundError: java_cup/runtime/lr_parser at JFlex.anttask.JFlexTask.execute(JFlexTask.java:71) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) I couldn&amp;rsquo;t locate the cause of this error and after struggling a lot, the solution was pretty simple.</description>
    </item>
    <item>
      <title>C&#43;&#43; reference not to be confused with Java/Python/... reference</title>
      <link>/2010/05/24/c-reference-not-to-be-confused-with-java/python/...-reference/</link>
      <pubDate>Mon, 24 May 2010 00:00:00 +0000</pubDate>
      <guid>/2010/05/24/c-reference-not-to-be-confused-with-java/python/...-reference/</guid>
      <description>This program assigns a new object of class A to reference a. It looks as expected, reference changes to new object ( see line 23,24,25):&#xA;#include &amp;lt;iostream&amp;gt; using namespace std; class A { string name; public: A(string n): name(n) { } A(): name(&amp;#34;NO ONE&amp;#34;) { } void print() { cout &amp;lt;&amp;lt; &amp;#34;I am &amp;#34;&amp;lt;&amp;lt; name &amp;lt;&amp;lt; &amp;#34;!&amp;#34;&amp;lt;&amp;lt; endl; } }; int main(int argc, char *argv[]) { A matrix = A(&amp;#34;the matrix&amp;#34;); A &amp;amp;amp;a = matrix; a.</description>
    </item>
    <item>
      <title>Getting started with Maven!</title>
      <link>/2010/05/20/getting-started-with-maven/</link>
      <pubDate>Thu, 20 May 2010 00:00:00 +0000</pubDate>
      <guid>/2010/05/20/getting-started-with-maven/</guid>
      <description>I installed Maven on my Fedora 12 box and fired the command listed at How_do_I_make_my_first_Maven_project :&#xA;$ mvn archetype:create \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DgroupId=com.mycompany.app \ -DartifactId=my-app /usr/lib/jvm/java [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: &amp;#39;archetype&amp;#39;. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] The plugin &amp;#39;org.apache.maven.plugins:maven-archetype-plugin&amp;#39; does not exist or no valid version could be found [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: &amp;amp;amp;lt; 1 second [INFO] Finished at: Thu May 20 13:15:56 GMT+05:30 2010 [INFO] Final Memory: 13M/26M [INFO] ----------------------- I tried to debug it further by adding -X and -e options to the commandline.</description>
    </item>
    <item>
      <title>JDB - Java Debugger</title>
      <link>/2009/11/07/jdb-java-debugger/</link>
      <pubDate>Sat, 07 Nov 2009 00:00:00 +0000</pubDate>
      <guid>/2009/11/07/jdb-java-debugger/</guid>
      <description>Debugging Java Code jdb supports fairly primitive support for debugging, which is sufficient ( sort of ) when used as a backend for an IDE ( like NetBeans, Eclipse etc. ).&#xA;However when I compare it with GDB ( the GNU Debugger ), as a tool to be used on the terminal, it seems to be pretty old. JDB lacks in features and commands which GDB specializes in. I was mainly interested in abbreviation of commands.</description>
    </item>
  </channel>
</rss>
