<?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>javanus.com</title>
	<atom:link href="http://javanus.com/blogs/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://javanus.com/blogs</link>
	<description>blog about java SE, java EE, oracle, solaris, tomcat</description>
	<lastBuildDate>Sun, 05 Sep 2010 19:06:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The challenges I faced programming with struts2</title>
		<link>http://javanus.com/blogs/?p=174</link>
		<comments>http://javanus.com/blogs/?p=174#comments</comments>
		<pubDate>Sun, 05 Sep 2010 18:49:05 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[Java EE]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=174</guid>
		<description><![CDATA[I am programming with struts2 for two months. I have developed a simple application to gather user requests. I found a lot of simple example with google but I have not found any good example for a more complex application.
I will put in this post all the encountered problems. I plan to write more in [...]]]></description>
			<content:encoded><![CDATA[<p>I am programming with struts2 for two months. I have developed a simple application to gather user requests. I found a lot of simple example with google but I have not found any good example for a more complex application.</p>
<p>I will put in this post all the encountered problems. I plan to write more in detail about each issue in a separete posts. This post will be updated regularly. I will be very glad to get an answer for unsolved problems.</p>
<p>I have divided different features/probles into three categories: solved, NOT SOLVED and not started yet. Category &#8220;not stared yet&#8221; is used to describe the features I am planning to develop.</p>
<ul>
<li>how to display a login form when the user is not logged yet &#8211; solved</li>
<li>how to use i18n with struts2 &#8211; solved</li>
<li>how to redirect to the same page after changing locale &#8211; NOT SOLVED</li>
<li>how to set a default language &#8211; solved</li>
<li>how to use a simple theme and error text &#8211; solved</li>
<li>how to put more than one field in a row within s:form &#8211; solved</li>
<li>how to use tiles &#8211; solved</li>
<li>how to use datepicker and date validation for not default date format &#8211; solved</li>
<li>how to use displaytag with i18n &#8211; solved</li>
<li>how to use form validation &#8211; solved</li>
<li>how to upload a file &#8211; not started yet</li>
<li>how to upload multiple files &#8211; not stared yet</li>
<li>how to connect struts2 application with a jasper report &#8211; not started yet</li>
<li>how to log out &#8211; solved</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=174</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using datetimepicker with struts2 and theme qxhtml</title>
		<link>http://javanus.com/blogs/?p=161</link>
		<comments>http://javanus.com/blogs/?p=161#comments</comments>
		<pubDate>Fri, 20 Aug 2010 18:45:09 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[Java EE]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[datetimepicker]]></category>
		<category><![CDATA[many columns in one row]]></category>
		<category><![CDATA[qxhtml]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=161</guid>
		<description><![CDATA[It is very simple to create a form using struts2. Default theme is xhtml which supports errorfields and tooltips. I think the main disadvantage is that each textfield is placed in a separate row by default.
Label1: TextField1
Label2: TextField2
I would like to have many columns in one row.
Label1: TextField1 Label2: TextField2
I tried to use simple theme [...]]]></description>
			<content:encoded><![CDATA[<p>It is very simple to create a form using struts2. Default theme is xhtml which supports errorfields and tooltips. I think the main disadvantage is that each textfield is placed in a separate row by default.</p>
<blockquote><p>Label1: TextField1<br />
Label2: TextField2</p></blockquote>
<p>I would like to have many columns in one row.</p>
<blockquote><p>Label1: TextField1 Label2: TextField2</p></blockquote>
<p>I tried to use simple theme at the beginning but I found out that tooltips are not supported with a simple theme. I found the solution at <a href="http://www.vitarara.org/cms/struts_2_cookbook/creating_a_theme">http://www.vitarara.org/cms/struts_2_cookbook/creating_a_theme</a>. It is a great page but the page is a little bit outdated,</p>
<p>I am using struts2 2.0.11. I copied qxhtml theme from sample application on vitavara page into my project. I succeed to put many columns in one row but there was a problem with datetimepicker. I found out that I have to modified the file datepicker.ftl to make things working. There is a change in a second row. It looks like in the old struts2 version there was a /simple/datepicker.ftl instead of /simple/datetimepicker.ftl.</p>
<blockquote><p>&lt;#include &#8220;/${parameters.templateDir}/${parameters.theme}/controlheader.ftl&#8221; /&gt;<br />
&lt;#include &#8220;/${parameters.templateDir}/simple/datetimepicker.ftl&#8221; /&gt;<br />
&lt;#include &#8220;/${parameters.templateDir}/qxhtml/controlfooter.ftl&#8221; /&gt;</p></blockquote>
<p>You can use labelcolspan and inputcolspan to control the size of particular object. Example: the number of columns in a separate row is 8 columns. If we would like to put only one textfield in this row and if the label should take 1/4 then we would put 2 (2/8=1/4) for labelcolspan and 6 (6/8=3/4) for inputcolspan. Please check the code below.<br />
<strong>IMPORTANT:</strong> Do not forget to use template=&#8221;datepicker&#8221; inside s:datetimepicker tag.</p>
<blockquote><p>&lt;s:datetimepicker template=&#8221;datepicker&#8221; label=&#8221;MyDate&#8221; theme=&#8221;qxhtml&#8221;&gt;<br />
&lt;s:param name=&#8221;labelcolspan&#8221; value=&#8221;%{3}&#8221;/&gt;<br />
&lt;s:param name=&#8221;inputcolspan&#8221; value=&#8221;%{4}&#8221;/&gt;<br />
&lt;/s:datetimepicker&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=161</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to limit the text length in a TextBox using JavaFX</title>
		<link>http://javanus.com/blogs/?p=152</link>
		<comments>http://javanus.com/blogs/?p=152#comments</comments>
		<pubDate>Tue, 20 Jul 2010 18:50:22 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javafx]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[textbox]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=152</guid>
		<description><![CDATA[I did not find any good example how to limit the text length in the TextBox control so I did it myself. Please feel free to use it.
/**
* @author www.javanus.com/AssistWeb
*/

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.TextBox;

Stage {
   title: "Application title"

   scene: Scene {
      width: 250
     [...]]]></description>
			<content:encoded><![CDATA[<p>I did not find any good example how to limit the text length in the TextBox control so I did it myself. Please feel free to use it.<br />
/**<br />
* @author <a href="http://www.javanus.com/AssistWeb">www.javanus.com/AssistWeb</a><br />
*/</p>
<pre>
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.TextBox;
<code>
Stage {
   title: "Application title"

   scene: Scene {
      width: 250
      height: 80
      content: [

         TextBox {
            override function replaceSelection(repl)
            {
            //limit text length to 5 charactes
            if (rawText.length() &lt; 5) {
               super.replaceSelection(repl);
            }
         }
      }
    ]
   }
}
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=152</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summary row in jTable (Swing/Java)</title>
		<link>http://javanus.com/blogs/?p=145</link>
		<comments>http://javanus.com/blogs/?p=145#comments</comments>
		<pubDate>Mon, 31 Aug 2009 08:23:21 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[Java SE]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[summary row in jtable]]></category>
		<category><![CDATA[total row in jtable]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=145</guid>
		<description><![CDATA[Summary row is used to present a total sum at the bottom of the jTable.
I have developed a grid component consists from the following components: JPanel is a basic container, jScrollPaneBasic is used to display horizontal scrollbar to handle a summary table and a data table. A data table (zebraJTable1) has another scrollPabe called jScrollPaneTabel used [...]]]></description>
			<content:encoded><![CDATA[<p>Summary row is used to present a total sum at the bottom of the jTable.</p>
<p>I have developed a grid component consists from the following components: JPanel is a basic container, jScrollPaneBasic is used to display horizontal scrollbar to handle a summary table and a data table. A data table (zebraJTable1) has another scrollPabe called jScrollPaneTabel used to display vertical scrollbar.</p>
<p><img class="aligncenter size-full wp-image-147" title="summary_row011" src="http://javanus.com/blogs/wp-content/uploads/2009/08/summary_row011.jpg" alt="" width="292" height="109" /></p>
<p>Picture below presents the summary row from the application.</p>
<p><a href="http://javanus.com/blogs/wp-content/uploads/2009/08/summary_row02.jpg"><img class="aligncenter size-full wp-image-148" title="summary_row02" src="http://javanus.com/blogs/wp-content/uploads/2009/08/summary_row02.jpg" alt="" width="499" height="292" /></a></p>
<p>Do not hesitate to run a demo at <a href="http://www.javanus.com/AssistWeb">http://www.javanus.com/AssistWeb</a>. Here are the steps needed to display summary rows in the application:</p>
<p>Manual: <br />
1.start the demo  <br />
2.login as a GUEST username, password is empty <br />
3.select <em>Invoices</em> in the menu and after that select the menu item <em>Review of cash accounts</em> (Invoices-&gt;Review of cash accounts) <br />
4.click Search button to display data</p>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=145</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PivotTable in java (Swing)</title>
		<link>http://javanus.com/blogs/?p=133</link>
		<comments>http://javanus.com/blogs/?p=133#comments</comments>
		<pubDate>Sun, 21 Jun 2009 19:05:45 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[Java SE]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[libraries for PivotTables]]></category>
		<category><![CDATA[OpenSwing]]></category>
		<category><![CDATA[PivotTable in java]]></category>
		<category><![CDATA[the hotel reservation software]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=133</guid>
		<description><![CDATA[I was looking for a PivotTable in java(swing) for a long time. I found out three different libraries for PivotTables. Lets check out each one:
1.JIDE &#8211; http://www.jidesoft.com/products/pivot.htm
JIDE software looks amazing but it is not an open source project. At the moment I am strictly &#8220;opensource&#8221; oriented so the JIDE is not the right choice. I [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a PivotTable in java(swing) for a long time. I found out three different libraries for PivotTables. Lets check out each one:</p>
<p>1.JIDE &#8211; <a href="http://www.jidesoft.com/products/pivot.htm">http://www.jidesoft.com/products/pivot.htm</a></p>
<p>JIDE software looks amazing but it is not an open source project. At the moment I am strictly &#8220;opensource&#8221; oriented so the JIDE is not the right choice. I would be very glad if they will decided to opensource their libraries. The screenshots looks great.</p>
<p>2.JMAGALLANES &#8211; <a href="http://sourceforge.net/projects/jmagallanes">http://sourceforge.net/projects/jmagallanes</a></p>
<p>It is an opensource project but the project is not active at the moment. The last update is from 2006. I have written an email to the authors and I have got a reply. They have told me they are planning the next release in a few months.</p>
<p>3.OPENSWING &#8211; <a href="http://oswing.sourceforge.net/">http://oswing.sourceforge.net/</a></p>
<p>It is an opensource project. The project is active. I have downloaded the opensource library and the pivotTable worked fine. After a while I found a bug (<a href="http://sourceforge.net/forum/forum.php?thread_id=3296825&amp;forum_id=572329">http://sourceforge.net/forum/forum.php?thread_id=3296825&amp;forum_id=572329</a>) but Mcarniel did his job fast and well. The bug was corrected in the next week.</p>
<p>Below is a picture from my application which presents the use of pivotTable.</p>
<p><a href="http://javanus.com/blogs/wp-content/uploads/2009/06/pivottable1.jpg"><img class="alignnone size-medium wp-image-135" title="pivottable1" src="http://javanus.com/blogs/wp-content/uploads/2009/06/pivottable1-300x219.jpg" alt="" width="300" height="219" /></a></p>
<p>The above screen shot is from the hotel reservation software. You are free to launch a demo from <a href="http://www.javanus.com/AssistWeb/">http://www.javanus.com/AssistWeb/</a>. Below are the steps used to test a PivotTable:</p>
<p>1.Select &#8220;Reports-&gt;Reservations&#8221; in the menu</p>
<p><a href="http://javanus.com/blogs/wp-content/uploads/2009/06/pivottable01.jpg"><img class="alignnone size-medium wp-image-139" title="pivottable01" src="http://javanus.com/blogs/wp-content/uploads/2009/06/pivottable01-300x85.jpg" alt="" width="300" height="85" /></a></p>
<p>2.Select &#8220;Search&#8221; button</p>
<p><a href="http://javanus.com/blogs/wp-content/uploads/2009/06/pivottable02.jpg"><img class="alignnone size-medium wp-image-140" title="pivottable02" src="http://javanus.com/blogs/wp-content/uploads/2009/06/pivottable02-300x97.jpg" alt="" width="300" height="97" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=133</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Serialization, Timezones and Java Dates</title>
		<link>http://javanus.com/blogs/?p=129</link>
		<comments>http://javanus.com/blogs/?p=129#comments</comments>
		<pubDate>Sat, 06 Jun 2009 16:14:36 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[Java SE]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java dates timezone http servlet]]></category>
		<category><![CDATA[java serializable timezone]]></category>
		<category><![CDATA[Serialization]]></category>
		<category><![CDATA[Timezones and Java Dates]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=129</guid>
		<description><![CDATA[Timezone has not been kept while transfering over http.
The data are stored in the tableModel on the client side. TableModel is serialized and sent over the http to the server. The servlet on the server deserializes the data into the tableModel. TableModel is stored into the database.

My client is located in the central Europe and the server [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Timezone has not been kept while transfering over http.</strong></p>
<p>The data are stored in the tableModel on the client side. TableModel is serialized and sent over the http to the server. The servlet on the server deserializes the data into the tableModel. TableModel is stored into the database.</p>
<p><a href="http://javanus.com/blogs/wp-content/uploads/2009/06/tablemodeltoserver.jpg"><img class="alignnone size-medium wp-image-130" title="tablemodeltoserver" src="http://javanus.com/blogs/wp-content/uploads/2009/06/tablemodeltoserver-300x79.jpg" alt="" width="300" height="79" /></a></p>
<p>My client is located in the central Europe and the server is located in the USA. The client time was Jun 06 00:00:00 CEST 2009. The data was transferred over the http and the same date on the server was Jun 05 17:00:00 CDT 2009.</p>
<p>Solution:</p>
<p>I set GMT timezone on both sides.</p>
<p>TimeZone tz = TimeZone.getDefault();<br />
tz.setDefault(TimeZone.getTimeZone(&#8220;GMT&#8221;));</p>
<p>The client and the server date time are the same after setting default timezone: Jun 06 00:00:00 GMT 2009.</p>
<p> Do not hesistate to check out <a href="http://www.javanus.com/AssistWeb">a hotel reservation software</a> using the described technology.<br />
 </p>
<p><span style="font-size: xx-small;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=129</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get default Locale Date Format Pattern?</title>
		<link>http://javanus.com/blogs/?p=124</link>
		<comments>http://javanus.com/blogs/?p=124#comments</comments>
		<pubDate>Thu, 14 May 2009 18:45:34 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[Date Format Pattern]]></category>
		<category><![CDATA[default locale date pattern]]></category>
		<category><![CDATA[JXDatePicker]]></category>
		<category><![CDATA[present date in a localized format]]></category>
		<category><![CDATA[resource bundles]]></category>
		<category><![CDATA[SimpleDateFormat]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=124</guid>
		<description><![CDATA[I am using a JXDatePicker component to present date fields in my application(http://www.javanus.com/AssistWeb). The application supports seven different languages at the moment. Translation is using resource bundles and it works fine. I also want to localize date fields to present date in a localized format.
It is very easy to convert a date in a paricular [...]]]></description>
			<content:encoded><![CDATA[<p>I am using a JXDatePicker component to present date fields in my application(<a href="http://www.javanus.com/AssistWeb">http://www.javanus.com/AssistWeb</a>). The application supports seven different languages at the moment. Translation is using resource bundles and it works fine. I also want to localize date fields to present date in a localized format.</p>
<p>It is very easy to convert a date in a paricular format in java. SimpleDateFormat is easy to use, programmer should only pass a particular date format  (dd/MM/yy or dd.MM.yyyy).</p>
<p>The <em><strong>problem</strong></em> arise when I want to provide a date format for a jXDatePicker component. I did not know how to set the proper format for JXDatePicker according to selected language. I just need a localized date format pattern to set the format for jXdatePicker. After a few hours I found the solution I would like to share you.</p>
<p>//inicialization</p>
<blockquote><p>jXDatePickerDateField.setDate(new java.util.Date());</p>
<p><strong>Solution:</strong></p>
<p>Locale locale = Locale.getDefault();</p>
<p><strong>String datePattern = ((SimpleDateFormat)DateFormat.getDateInstance(SimpleDateFormat.MEDIUM,locale)).toPattern();</strong></p>
<p><strong>jXDatePickerDatum.setFormats(datePattern);</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=124</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Swing application comunicates over http with application server and database</title>
		<link>http://javanus.com/blogs/?p=117</link>
		<comments>http://javanus.com/blogs/?p=117#comments</comments>
		<pubDate>Sun, 03 May 2009 14:40:43 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[Java SE]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[hotel reservation]]></category>
		<category><![CDATA[swing over http]]></category>
		<category><![CDATA[three tired swing application]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=117</guid>
		<description><![CDATA[This is the announcement for version 1.0 of Hotel Reservation software written in java. Application is multilanguage but it is still poorly translated at the moment. Main functionality has been translated into English and some other languages. It could be translated to other languages of course if somebody needs it. Application was originally developed in [...]]]></description>
			<content:encoded><![CDATA[<p>This is the announcement for <strong>version 1.0 </strong>of Hotel Reservation software written in java. Application is multilanguage but it is still poorly translated at the moment. Main functionality has been translated into English and some other languages. It could be translated to other languages of course if somebody needs it. Application was originally developed in Slovenian language so you could expect to find out some fields which has not been translated yet.</p>
<p>I mixed different technologies in this application: swing, servlets, tomcat and mysql. The entire application is written in swing, it comunicates over http using servlets with the application server, servlets communicate over the jdbc with the database. I plan to describe particular parts of the application in more details in the following days.</p>
<p><a href="http://javanus.com/blogs/wp-content/uploads/2009/05/assist_quick_start_011.jpg"><img class="aligncenter size-medium wp-image-120" title="assist_quick_start_011" src="http://javanus.com/blogs/wp-content/uploads/2009/05/assist_quick_start_011-300x124.jpg" alt="" width="300" height="124" /></a><a href="http://javanus.com/blogs/wp-content/uploads/2009/05/assist_quick_start_01.jpg"></a></p>
<p>You can launch a demo at <a href="http://javanus.com/AssistWeb/">http://javanus.com/AssistWeb/</a>. The picture below presents basic steps to create your first reservation.</p>
<p><a href="http://javanus.com/blogs/wp-content/uploads/2009/05/assist_quick_start.jpg"><img class="aligncenter size-medium wp-image-118" title="assist_quick_start" src="http://javanus.com/blogs/wp-content/uploads/2009/05/assist_quick_start-300x166.jpg" alt="" width="300" height="166" /></a></p>
<p>Application works fine as a desktop application which communicate with the database using jdbc at the moment. Please send me an email to info at javanus.com if you would like to test it a desktop version.</p>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=117</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The big three: JDeveloper, Eclipse and Netbeans. Which one do you prefer?</title>
		<link>http://javanus.com/blogs/?p=108</link>
		<comments>http://javanus.com/blogs/?p=108#comments</comments>
		<pubDate>Sun, 11 Jan 2009 20:36:26 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[choosing an IDE to develop Java application]]></category>
		<category><![CDATA[comparison JDeveloper Eclipse Netbeans]]></category>
		<category><![CDATA[JDeveloper]]></category>
		<category><![CDATA[jdeveloper vs eclipse]]></category>
		<category><![CDATA[jdeveloper vs netbeans]]></category>
		<category><![CDATA[migrate from oracle forms to java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[netbeans vs eclipse]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=108</guid>
		<description><![CDATA[I would like to get your opinion on choosing an IDE to develop Java applications.
At the moment I am using Netbeans and I am very satisfied with it. I tried to get a good comparison between them with google. There are a lot of old articles about &#8220;The big Three&#8221; but I could not get [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to get your opinion on choosing an IDE to develop Java applications.</p>
<p>At the moment I am using Netbeans and I am very satisfied with it. I tried to get a good comparison between them with google. There are a lot of old articles about &#8220;The big Three&#8221; but I could not get a good answer because they evolve a lot in the recent time. It is time to get an up to date situation!</p>
<p>Here is my opinon:</p>
<p><strong>JDeveloper Pro</strong> &#8211; if you would like to migrate from oracle forms to java -&gt; use ADF (application development framework), support all phases of software development</p>
<p><strong>JDeveloper Contra</strong> &#8211; it is not independent (developed by Oracle), does not have future in open source world, slow startup</p>
<p><strong>Netbeans Pro</strong> &#8211; strong community, open source, independent</p>
<p><strong>Netbeans Contra</strong> &#8211; bad reputation from the past, I am missing a plug-in for data modelling</p>
<p><strong>Eclipse Pro</strong> &#8211; a lot of people using it, it is fast</p>
<p><strong>Eclipse Contra</strong> &#8211; I think it is losing market share, no clear vision</p>
<p>I would be very glad to get your opinion! Do you agree or disagree with my statements? Do not hesitate to put your comment!</p>
<p><strong>Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=108</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Zombie killer on linux or how to end the financial crisis?</title>
		<link>http://javanus.com/blogs/?p=90</link>
		<comments>http://javanus.com/blogs/?p=90#comments</comments>
		<pubDate>Mon, 05 Jan 2009 17:51:24 +0000</pubDate>
		<dc:creator>javanus</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[cpu time spent by process]]></category>
		<category><![CDATA[ias]]></category>
		<category><![CDATA[identify the zombie process]]></category>
		<category><![CDATA[kill process]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[oracle application server]]></category>
		<category><![CDATA[terminate zombie process]]></category>
		<category><![CDATA[Zombie killer]]></category>

		<guid isPermaLink="false">http://javanus.com/blogs/?p=90</guid>
		<description><![CDATA[Have you ever tried to identify zombie processes on your server? The zombie identification application is written in java and could be used on linux. It is very easy to adopt the code for other operating systems. The zombie killer has been originally written to kill zombie processes on Oracle Application Server.
Go to the end if you are [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to identify zombie processes on your server? The zombie identification application is written in java and could be used on linux. It is very easy to adopt the code for other operating systems. The zombie killer has been originally written to kill zombie processes on Oracle Application Server.</p>
<p>Go to the end if you are only interested how to end the financial crisis&#8230;;)</p>
<p>Application has two parameters:</p>
<ul>
<li>the process name is used to find out only the specific processes. In my example the parameter value is <em>frmweb.</em> Parameter value frmweb is used to limit the application to check only the cpu time spent by oracle forms processes</li>
<li>the cpu time used by process is used to define the maximum allowed cpu time spent by particular process</li>
</ul>
<p>How does it works:</p>
<ol>
<li>Application first get all the processes in desired format.
<ol>
<li>ps -eo (to see every process with a user defined format)</li>
<li>ps -eo user, pid, time, command (to see every process in format user, process id, time spent by process and command)</li>
</ol>
</li>
<li>Application checks only the processes where the parameter value for process name match the command (parameter value is in command string)</li>
<li>Application parses the process values and check the cpu time spent by the process. Process is terminated if the cpu time spent is greater than the parameter value for cpu time.</li>
</ol>
<p>Application could be run using crontab each 15 minutes. Example below shows how to kill oracle forms sessions which exceeds more than 1000 seconds of cpu time<br />
0,15,30,45 * * * * /usr/java/jdk1.6.0_11/bin/java -cp .  ZombieKiller frmweb 1000</p>
<p><code><br />
import java.io.BufferedInputStream;<br />
import java.io.IOException;<br />
import java.io.InputStream;<br />
import java.io.InputStreamReader;<br />
import java.io.Reader;<br />
</code></p>
<p>/**<br />
 *<br />
 * @author http://www.javanus.com/blogs<br />
 */</p>
<p><code>public class ZombieKiller {<br />
	public static String getUnparsedProcessList() {<br />
		InputStream in = null;<br />
		InputStream buffer = null;<br />
		Reader reader = null;<br />
		try {<br />
			//get all processes<br />
                       Process p = Runtime.getRuntime().exec("ps -eo user,pid,time,command --sort stime");<br />
			in = p.getInputStream();<br />
			buffer = new BufferedInputStream(in);<br />
			reader = new InputStreamReader(buffer);<br />
			char[] charr = new char[1024];<br />
			StringBuffer strbuff = new StringBuffer();<br />
			while(true) {<br />
				int r = reader.read(charr);<br />
				if(r<=0) {<br />
					break;<br />
				}<br />
				strbuff.append(charr, 0, r);<br />
			}<br />
			return strbuff.toString();<br />
		}catch(IOException e) {<br />
			//todo - error handling<br />
			e.printStackTrace();<br />
		}<br />
		return null;<br />
	}</p>
<p></code><br />
    /**<br />
     * @param args the command line arguments<br />
     */<br />
<code>    public static void main(String[] args) throws IOException {<br />
        System.out.println("Check out http://www.javanus.com/blogs &#038;&#038; http://www.javanus.com/blog");<br />
        if (args.length==0) {<br />
            System.out.println("Usage: java -classpath . ZombieKiller
<processname> <secAllowed>");<br />
            return;<br />
        }<br />
        String ls_processName = args[0];</p>
<p>        int li_maxSecAllow = 9999;<br />
        //Is the maximum number of seconds defined<br />
        if (args.length>1 &#038;&#038; args[1] != null) {<br />
            li_maxSecAllow = Integer.parseInt(args[1]);<br />
        }<br />
        String ls_procesi = getUnparsedProcessList();<br />
        while (ls_procesi.indexOf("\n")>=0) {<br />
            String ls_rowValue = ls_procesi.substring(0, ls_procesi.indexOf("\n"));<br />
            //parse row if process name match<br />
            if (ls_rowValue.indexOf(ls_processName)>=0) {<br />
                //user<br />
                String ls_user = ls_rowValue.substring(0, ls_rowValue.indexOf(" "));<br />
                ls_rowValue = ls_rowValue.substring(ls_rowValue.indexOf(" ")+1, ls_rowValue.length()).trim();<br />
                //pid<br />
                String ls_pid = ls_rowValue.substring(0, ls_rowValue.indexOf(" "));<br />
                ls_rowValue = ls_rowValue.substring(ls_rowValue.indexOf(" ")+1, ls_rowValue.length()).trim();<br />
                //time<br />
                String ls_time = ls_rowValue.substring(0, ls_rowValue.indexOf(" "));<br />
                //System.out.println(ls_time);<br />
                ls_time = ls_time.substring(ls_time.indexOf(":")+1, ls_time.length()).trim();<br />
                String ls_minute = ls_time.substring(0, ls_time.indexOf(":"));<br />
                //System.out.println("ls_minute="+ls_minute);<br />
                ls_time = ls_time.substring(ls_time.indexOf(":")+1, ls_time.length()).trim();<br />
                String ls_sek = ls_time;<br />
                //cmd<br />
                ls_rowValue = ls_rowValue.substring(ls_rowValue.indexOf(" ")+1, ls_rowValue.length()).trim();<br />
                String ls_cmd = ls_rowValue;//.substring(0, ls_rowValue.indexOf(" "));<br />
                //ali je noter ip adressa<br />
                int li_spentCputTime = Integer.parseInt(ls_minute)*60+Integer.parseInt(ls_sek);<br />
                //System.out.println(ls_cmd);<br />
                ls_rowValue = ls_rowValue.substring(ls_rowValue.indexOf(" ")+1, ls_rowValue.length()).trim();<br />
                //should I terminate this session?<br />
                if (li_spentCputTime>li_maxSecAllow) {<br />
                    Process p = Runtime.getRuntime().exec("kill -9 " + ls_pid);<br />
                    System.out.println("Process " + ls_pid + " has been successfully terminated!");<br />
                }<br />
            }<br />
            ls_procesi = ls_procesi.substring(ls_procesi.indexOf("\n")+1, ls_procesi.length());<br />
        }</p>
<p>    }<br />
}<br />
</code></p>
<p>It would be nice to end the financial crisis on the same way. I suggest to use <code>kill -9 42</code> to end the economic depression. 42???</p>
<p><strong>Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://javanus.com/blogs/?feed=rss2&amp;p=90</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
