<?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: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-18481069</id><updated>2012-01-24T14:20:04.271+05:30</updated><category term='AppEngine'/><category term='Sun'/><category term='Free'/><category term='OSGi'/><category term='Huawei E220'/><category term='SVN'/><category term='NetBeans'/><category term='Android'/><category term='Java'/><category term='Maven'/><category term='OpenSource'/><category term='Eclipse'/><title type='text'>Chandana Napagoda - Java, Eclipse,Maven and Other Programming Tips</title><subtitle type='html'>Chandana Napagoda's Web Blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18481069.post-7096891603407504619</id><published>2012-01-03T09:49:00.003+05:30</published><updated>2012-01-03T09:49:41.163+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSGi'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Introduction to OSGi - 2 (OSGi Services)</title><content type='html'>There are so many OSGi tutorials, blogs, and samples. I am going to add another OSGi sample/tutorial with my OSGi leanings. Here is my previous article regarding &lt;a href="http://cnapagoda.blogspot.com/2011/09/introduction-to-osgijava-modular.html"&gt;OSGi&lt;/a&gt;(&lt;a class="GMUUXGEDGN" href="http://cnapagoda.blogspot.com/2011/09/introduction-to-osgijava-modular.html"&gt;Introduction to OSGi&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;An OSGi Service is a java object instance which is registered with OSGi framework with set of attributes. Services can be accessed via service registry(performed via the class BundleContext). BundleActivator is to be invoked on start and stop. When BundleActivator call start method we are going to register our service. After that any bundle can access that service.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Service Bundle:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In service bundle you need to export your service and need to register it via service registry. When we are exporting service we export interface package only. As usual that is to hide the implementation from the other bundles.&lt;br /&gt;&lt;br /&gt;I have created a sample OSGi project called HelloServcie&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MANIFEST.MF&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;Manifest-Version: 1.0&lt;br /&gt;Bundle-ManifestVersion: 2&lt;br /&gt;Bundle-Name: HelloService&lt;br /&gt;Bundle-SymbolicName: com.chandana.hello.HelloService&lt;br /&gt;Bundle-Version: 1.0.0&lt;br /&gt;Bundle-Activator: com.chandana.hello.helloservice.Activator&lt;br /&gt;Bundle-Vendor: CHANDANA&lt;br /&gt;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&lt;br /&gt;Import-Package: org.osgi.framework;version="1.3.0"&lt;br /&gt;Export-Package: com.chandana.hello.service&lt;br /&gt;Bundle-ActivationPolicy: lazy&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Service Interface:&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;public interface  HelloService {    &lt;br /&gt;    public String helloMethods();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Service Implementation:&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;public class HelloServiceImpl implements HelloService {&lt;br /&gt;    @Override&lt;br /&gt;    public String helloMethods() {&lt;br /&gt;        String retValue = "Inside Hello Service method";&lt;br /&gt;        return retValue;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Boundle Activater:&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;public class Activator implements BundleActivator {&lt;br /&gt;    ServiceRegistration serviceRegistration;&lt;br /&gt;    /*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)&lt;br /&gt;     */&lt;br /&gt;    public void start(BundleContext context) throws Exception {&lt;br /&gt;        System.out.println("Bundle Started.....!!!!!");&lt;br /&gt;        HelloService service = new HelloServiceImpl();&lt;br /&gt;        serviceRegistration = context.registerService(HelloService.class.getName(), service,null);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)&lt;br /&gt;     */&lt;br /&gt;    public void stop(BundleContext context) throws Exception {&lt;br /&gt;        System.out.println("Bundle Stoped.....!!!!!");&lt;br /&gt;        serviceRegistration.unregister();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When we are using published services, we can import it from another Bundle. So need to create another &lt;b&gt;Plug-In-Project &lt;/b&gt;for HelloClient&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Bundle Context&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Bundle context is the context of a single bundle within the OSGi runtime and it is created when Bundle get started. Bundle context can be used to Install new bundles, Obtain registered services by other bundles and Register services in the framework.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MANIFEST.MF&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;Import-Package: org.osgi.framework;version="1.3.0",com.chandana.hello.service&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After importing the bundle, you can access the service. Important thing is service can be accessed only through bundle context. You can get actual service object via BundleContext.getService() method .&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Activator class:&lt;/b&gt; &lt;br /&gt;&lt;pre class="brush: js"&gt;public class Activator implements BundleActivator {&lt;br /&gt;     ServiceReference serviceReference;     &lt;br /&gt;    /*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)&lt;br /&gt;     */&lt;br /&gt;    public void start(BundleContext context) throws Exception {&lt;br /&gt;        serviceReference= context.getServiceReference(HelloService.class.getName());&lt;br /&gt;        HelloService helloService =(HelloService)context.getService(serviceReference);&lt;br /&gt;        System.out.println(helloService.helloMethods());&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /*&lt;br /&gt;     * (non-Javadoc)&lt;br /&gt;     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)&lt;br /&gt;     */&lt;br /&gt;    public void stop(BundleContext context) throws Exception {&lt;br /&gt;        context.ungetService(serviceReference);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;context.getServiceReference() method return the HelloService OSGi service reference&amp;nbsp; and Using that service reference can access the actual service object.&lt;br /&gt;&lt;br /&gt;For Run this project click on &lt;b&gt;Run &lt;/b&gt;--&amp;gt; &lt;b&gt;Run Configuration&lt;/b&gt; , In &lt;b&gt;OSGi Framework&lt;/b&gt;&amp;nbsp; Right click and create&lt;b&gt; new Run Configuration&lt;/b&gt;. Make sure &lt;b&gt;HelloService&lt;/b&gt; and &lt;b&gt;HelloClient&lt;/b&gt; . &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Issues:&lt;/b&gt;&lt;br /&gt;What happened if the service is not started when client is accessing the service?&lt;br /&gt;What happened if you have stopped the service bundle?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Code Repo:&lt;/b&gt;&lt;br /&gt;http://code.google.com/p/osgi-world/source/browse/#svn/trunk/com.chandana.hello.HelloService&lt;br /&gt;http://code.google.com/p/osgi-world/source/browse/#svn/trunk/com.chandana.hello.HelloClient&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-7096891603407504619?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/7096891603407504619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=7096891603407504619' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7096891603407504619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7096891603407504619'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2012/01/introduction-to-osgi-2-osgi-services.html' title='Introduction to OSGi - 2 (OSGi Services)'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-171602114589163148</id><published>2011-12-13T10:00:00.001+05:30</published><updated>2011-12-13T10:00:37.408+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='SVN'/><title type='text'>How to Ignore Files or Directories in Subversion</title><content type='html'>We are facing a common problem when trying to commit some changes to the SVN. That is each time we have to ignore some JAR files, because those JAR files are user run time specific and if they are committed, it would not work on other local runtimes.&lt;br /&gt;&lt;br /&gt;Here is a pretty simple solution for this problem. We can tell subversion to ignore directories or specific files as follows.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;u&gt;Ignore directories or specific files.&lt;/u&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;svn propedit svn:ignore ./some_path&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;It will ignore all files in the specified directory. Here only wildcard indication is supported, and regular expressions are not supported.&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;u&gt;Example wildcard supprt:&lt;i&gt;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/u&gt;&lt;br /&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp;svn propedit svn:ignore *&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;u&gt;Example ingnore class files with wildcard:&lt;/u&gt;&lt;br /&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; svn propedit svn:ignore *.class&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;If you are using Eclipse SubEclispe plugin,&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Right Click file or folder --&amp;gt; Team --&amp;gt; Then click on svn:ignore&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-VprSYlrJuFc/TubUf938xMI/AAAAAAAAAgw/XQ62d2A49IA/s1600/Untitled+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="351" src="http://1.bp.blogspot.com/-VprSYlrJuFc/TubUf938xMI/AAAAAAAAAgw/XQ62d2A49IA/s320/Untitled+1.png" width="420" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-171602114589163148?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/171602114589163148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=171602114589163148' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/171602114589163148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/171602114589163148'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/12/how-to-ignore-files-or-directories-in.html' title='How to Ignore Files or Directories in Subversion'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-VprSYlrJuFc/TubUf938xMI/AAAAAAAAAgw/XQ62d2A49IA/s72-c/Untitled+1.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-7864122482998794219</id><published>2011-11-10T19:25:00.000+05:30</published><updated>2011-12-13T10:01:08.999+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>How to debug using Maven Jetty</title><content type='html'>Debugging is a better approach to find out bugs in our programs. Here is a way to debug a maven project, and I am going to run my web application in the Jetty server.&lt;br /&gt;&lt;br /&gt;First you need to add the following environmental variables on your Windows/Linux environment. &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;MAVEN_OPTS = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Now go to your maven web project location through command line and start the jetter server -&amp;gt; mvn jetty:run&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-PKO6Spg6Ap4/TrjAV5xZe_I/AAAAAAAAAgI/WYCwiWX2JOc/s1600/Untitled+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="201" src="http://2.bp.blogspot.com/-PKO6Spg6Ap4/TrjAV5xZe_I/AAAAAAAAAgI/WYCwiWX2JOc/s400/Untitled+2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now in eclipse debug configuration, add a remote Java application instance on port 4000. Then Add some debug points to your codes&amp;nbsp; and start the remote app instance on debug mode. You can see the steps from following screen shots. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-U9IcTo0dRUE/TrjAsScn7XI/AAAAAAAAAgQ/olMEn1cdq-M/s1600/Untitled+4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="260" src="http://3.bp.blogspot.com/-U9IcTo0dRUE/TrjAsScn7XI/AAAAAAAAAgQ/olMEn1cdq-M/s400/Untitled+4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Xqs2QMKe5TA/TrjA5PC5IAI/AAAAAAAAAgY/u74e9cP8BTA/s1600/Untitled+5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://1.bp.blogspot.com/-Xqs2QMKe5TA/TrjA5PC5IAI/AAAAAAAAAgY/u74e9cP8BTA/s400/Untitled+5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this manner you can debug your java web apps and find out the bugs. With this way you can debug your java web app.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;if you are using maven latest version( Maven 2.0.8 or later)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;run the &lt;br /&gt;&lt;pre class="brush: js"&gt; mvnDebug  &lt;/pre&gt;command instead of&lt;br /&gt;&lt;pre class="brush: js"&gt; mvn &lt;/pre&gt;and attach a debugger on port 8000. &lt;br /&gt;&lt;br /&gt;&lt;span class="st"&gt; &lt;b&gt;&lt;i&gt;&lt;span style="color: #e69138;"&gt;Love to hear from you! feedback(comments) are always welcome&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-7864122482998794219?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/7864122482998794219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=7864122482998794219' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7864122482998794219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7864122482998794219'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/11/how-to-debug-using-maven-jetty.html' title='How to debug using Maven Jetty'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-PKO6Spg6Ap4/TrjAV5xZe_I/AAAAAAAAAgI/WYCwiWX2JOc/s72-c/Untitled+2.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-1609396184799190567</id><published>2011-10-25T13:53:00.000+05:30</published><updated>2011-11-11T21:07:31.438+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='AppEngine'/><title type='text'>Google Cloud SQL, Hibernate JPA Support</title><content type='html'>With my last post about Google Cloud SQL(Google App Engine) with Spring Hibernate, many people had encountered the same issue about HIbenrate JPA. If you are developing Hibernate JPA based applications,there is some issues with Hibernate JPA support which you need to be awared.&lt;br /&gt;&lt;br /&gt;When you are running the application you may get an error like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;&lt;/pre&gt;&lt;br /&gt;This is because Hibernate used JPA 2.0 specification. But Google App Engine only support JPA 1.0 specification. I also got the same issue, and therefore I used Spring Hibernate support (instead of Hibernate JPA).&lt;br /&gt;&lt;br /&gt;&lt;b style="color: orange;"&gt;"The App Engine Java SDK includes an implementation of JPA 1.0 for the App Engine datastore"&lt;br /&gt;&lt;/b&gt;Google App Engine JPA : &lt;a href="http://code.google.com/appengine/docs/java/datastore/jpa/"&gt;http://code.google.com/appengine/docs/java/datastore/jpa/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="st"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #e69138;"&gt;Love to hear from you! feedback(comments) are always welcome&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-1609396184799190567?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/1609396184799190567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=1609396184799190567' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1609396184799190567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1609396184799190567'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/10/google-cloud-sql-hibernate-jpa-support.html' title='Google Cloud SQL, Hibernate JPA Support'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-5546307307333371148</id><published>2011-10-17T21:39:00.000+05:30</published><updated>2011-11-11T21:07:56.665+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='AppEngine'/><title type='text'>Google Cloud SQL with Struts, Spring and Hibernate</title><content type='html'>With Google App engine SDK 1.5.5, Google have introduced &lt;a href="http://code.google.com/apis/sql/docs/introduction.html" target="_blank"&gt;Google Cloud SQL&lt;/a&gt; for GAE (Currently we can't connect any other external application with Google Cloud SQL. This can be only with Google App Engine Apps). &lt;br /&gt;&lt;br /&gt;It's faster than connecting with Amazon RDS and other Cloud based Data solutions. No need to worry about load balancing as well. Cloud SQL supports 5 QPS read/write rate, so as long as you don't go over that, you can use cloud SQL. If you are going over this read/write rate limit, datastore might become a much more effective approach to you.If you are storing large blobs data(images, attchments and sound files, it's better storing them in the datastore or blobstore.&lt;br /&gt;&lt;br /&gt;When Google App Engine became populer in late 2009 many people asked about Hibernate support. But with their datasore people were unable to develop Hibernate support applications with GAE. But with Google Cloud SQL developers can use Hibernate supported applications as well.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;Last week I shared my first application which was developed with Google Cloud SQL. It was only a JSP and Servlet based web application. Afterwards I mainly focused on developing a Struts, Spring &amp;amp; Hibernate based application and deploying it to Google App Engine where the data source is Cloud SQL.&lt;br /&gt;&lt;br /&gt;In Last weekend I got a time to focus on this idea. So finally I have deployed my Struts, Spring and Hibernate based application in to GAE and it's data source( Database) is Google Cloud SQL. If you are migrating your existing Spring Hibernate based application in to GAE and Cloud SQL, there is not much to do.&lt;br /&gt;&lt;br /&gt;Only need to change data source and driver name. If you need more clarification, feel free to contact me. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Try out my application &lt;a href="http://mycloudsql.appspot.com/"&gt;http://mycloudsql.appspot.com&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Source Code(CloudSQLSample2) : &lt;a href="http://code.google.com/p/cloudsql/"&gt;http://code.google.com/p/cloudsql/&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;My Previous Post: &lt;a href="http://cnapagoda.blogspot.com/2011/10/sample-application-with-google-cloud.html"&gt;http://cnapagoda.blogspot.com/2011/10/sample-application-with-google-cloud.html&lt;/a&gt;&lt;br /&gt;Cloud SQL Doc: &lt;a href="https://code.google.com/apis/sql/"&gt;https://code.google.com/apis/sql/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Google App Engine and Cloud SQL will be revolutions of Cloud Computing. &lt;b&gt;&lt;span style="color: red;"&gt;(updated 01-11-2011)&lt;/span&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-5546307307333371148?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/5546307307333371148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=5546307307333371148' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5546307307333371148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5546307307333371148'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/10/google-cloud-sql-with-struts-spring-and.html' title='Google Cloud SQL with Struts, Spring and Hibernate'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-7994189547195971176</id><published>2011-10-12T12:02:00.000+05:30</published><updated>2011-11-11T21:08:18.964+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='AppEngine'/><title type='text'>Sample Application with Google Cloud SQL</title><content type='html'>Three months ago I was able to participate in one of the Google App Engine based task management project.&amp;nbsp; However, in that project, I had to face some critical issues in searching as Google Datastore did not support many search options including LIKE search. It is known that searching is one of the essential parts of the enterprise applications. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;However, Google introduced &lt;a href="http://googleappengine.blogspot.com/2011/10/google-cloud-sql-your-database-in-cloud.html" target="_blank"&gt;Cloud SQL&lt;/a&gt; last week and they approved my "Google Cloud SQL" request today (they took 5 days to approve it.:D ). Once they approved, I decided to develop a sample application with Cloud SQL. Gogole Cloud SQL database engine is MySql Version 5.1.59 and database size must be no larger than 10GB. Here I have added option to Test LIKE search. If you need more clarification, feel free to contact me.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Test Application &lt;a href="http://securezilla.appspot.com/" target="_blank"&gt;http://securezilla.appspot.&lt;wbr&gt;&lt;/wbr&gt;com/&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;PS: Added Source Code&lt;br /&gt;Sample Project : &lt;a href="http://code.google.com/p/cloudsql/"&gt;http://code.google.com/p/cloudsql/&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #cc0000;"&gt;&lt;b&gt;New Post : &lt;a href="http://cnapagoda.blogspot.com/2011/10/google-cloud-sql-with-struts-spring-and.html" target="_blank"&gt;Google Cloud SQL with Spring and Hibernate&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="color: red;"&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Added on 2011-10-20:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Some people have issue when developing their application because Google currently doesn't support access Google Cloud SQL from outside Google App Engine. there for your local development you need to test with local DataBase(EX: Mysql). After that you when code release to Google App engine it's work fine.&lt;br /&gt;&lt;br /&gt;For you local development no need to change the connection URLs.Just need to pass the VM arguments . I think you are using Eclipse IDE. &lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Go to &lt;b&gt;Run --&amp;gt; Run Configurations&lt;/b&gt;&lt;br /&gt;Add the following lines into the your project &lt;b&gt;VM Arguments&lt;/b&gt; section.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;-Drdbms.server=local&lt;br /&gt;-Drdbms.driver=com.mysql.jdbc.Driver&lt;br /&gt;-Drdbms.url=jdbc:mysql://localhost:3306/database?user=dbuser&amp;amp;password=dbpass&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div id=":1ky"&gt;&lt;br /&gt;After that add MySql JDBC driver in to your &lt;b&gt;App Engine SDK/lib/impl&lt;/b&gt; folder. Then create DataBase and tables for according to requirement.&lt;/div&gt;&lt;div id=":1ky"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-7994189547195971176?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/7994189547195971176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=7994189547195971176' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7994189547195971176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7994189547195971176'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/10/sample-application-with-google-cloud.html' title='Sample Application with Google Cloud SQL'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-5153594336254959735</id><published>2011-09-11T10:07:00.000+05:30</published><updated>2012-01-04T09:01:32.473+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSGi'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Introduction to OSGi(Java Modular)</title><content type='html'>&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;a href="http://www.osgi.org/"&gt;OSGi Alliance &lt;/a&gt;is the governing body of this stranded and it was started at 1999. their initial goal was create open stranded for network devices. Based on this idea this specification introduced for Java also. Eclipse was first in Java. they introduced OSGi based Eclipse IDE at 2004 June.&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;OSGi is way to define dynamic module in java. There are main three OSGi container implemented for Java,such as&lt;a href="http://felix.apache.org/"&gt; Apache Felix&lt;/a&gt;, &lt;a href="http://www.eclipse.org/equinox/"&gt;Eclipse Equinox&lt;/a&gt; and &lt;a href="http://www.knopflerfish.org/"&gt;Knopflefish&lt;/a&gt;.&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;Why OSGi? Because OSGi provide ability to divided application in to multiple module and those module easy to manage with other dependencies. other than that is very easy to install, update,stop and delete module without stop engine(Ex: Tomcat web application container). We can have multiple version of implementation with effecting to other references.&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;There are main 3 layers in web based Java framework(Presentation , Business layer and&amp;nbsp; DAO layer). There we can divide it into three OSGi based module. then we can very easily fixed bug in one layer with out effecting to others and restarting our Web container. Just we need to update out module.&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;in OSGi world output is bundle, it can be either Jar or War file. A bundle consists of Java classes and other resources that with some additional metadata (providing services and packages to other bundles). &lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;I am going to use Eclipse IDE for create my first bundle. Because Eclipse IDe has built in Equinox container(every eclipse plugins are OSGi bundles) .&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;b&gt;Create Eclipse Plug-In-Project&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to &lt;b&gt;New--&amp;gt; Other --&amp;gt; Plug-In-Project&lt;/b&gt; and click on &lt;b&gt;Next&lt;/b&gt; then new project creation dialog will be appeared &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Provide project name and Target platform as below. and Click on &lt;b&gt;Next&lt;/b&gt;&lt;/li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Project name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : &lt;b&gt;com.chandana.Hello.HelloWorld&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Target platform : select &lt;b&gt;Stranded OSGi&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-33SaOaAs-wI/Tm7x2XSz0eI/AAAAAAAAAfk/2DPa1aJ40oI/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-33SaOaAs-wI/Tm7x2XSz0eI/AAAAAAAAAfk/2DPa1aJ40oI/s320/1.png" width="300" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;li&gt;In next screen you can change bundle information(These information available in MANIFEST.MF&amp;nbsp; and I will give details information later) then click on Next button. &lt;/li&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-xYdOnfaWTNc/Tm7yGgspa5I/AAAAAAAAAfs/uuie-kGHh9s/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-xYdOnfaWTNc/Tm7yGgspa5I/AAAAAAAAAfs/uuie-kGHh9s/s320/2.png" width="301" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;li&gt;After that OSGi project template selection dialog will be appear.There select&amp;nbsp; Hello OSGi Bundle and click on Finish &lt;/li&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-miHvTCqWIsI/Tm7yfh_ORlI/AAAAAAAAAfw/TTeEdJutVeU/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-miHvTCqWIsI/Tm7yfh_ORlI/AAAAAAAAAfw/TTeEdJutVeU/s320/3.png" width="301" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/ol&gt;After few second Eclipse will generate Hello World Plug-In-Project(I had Not responding few second :) )&lt;br /&gt;&lt;br /&gt;In my project structure is like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-NtuoYq5ZbAE/Tm7rNy6MUZI/AAAAAAAAAfU/ZaZcMGpRlAY/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="1" height="320" src="http://1.bp.blogspot.com/-NtuoYq5ZbAE/Tm7rNy6MUZI/AAAAAAAAAfU/ZaZcMGpRlAY/s320/4.png" width="268" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Activator.java&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;package com.chandana.hello.helloworld;&lt;br /&gt;&lt;br /&gt;import org.osgi.framework.BundleActivator;&lt;br /&gt;import org.osgi.framework.BundleContext;&lt;br /&gt;&lt;br /&gt;public class Activator implements BundleActivator {&lt;br /&gt;&lt;br /&gt; /*&lt;br /&gt;  * (non-Javadoc)&lt;br /&gt;  * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)&lt;br /&gt;  */&lt;br /&gt; public void start(BundleContext context) throws Exception {&lt;br /&gt;  System.out.println("Hello World!!");&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; /*&lt;br /&gt;  * (non-Javadoc)&lt;br /&gt;  * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)&lt;br /&gt;  */&lt;br /&gt; public void stop(BundleContext context) throws Exception {&lt;br /&gt;  System.out.println("Goodbye World!!");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Activator is class which implement &lt;b style="color: purple;"&gt;BundleActivator&amp;nbsp; &lt;/b&gt;interface. It has &lt;b style="color: purple;"&gt;stop &lt;/b&gt;and &lt;b style="color: purple;"&gt;start &lt;/b&gt;methods. &lt;span style="color: purple;"&gt;those methods are called when a bundle is started or stopped&lt;/span&gt;. This bundle activator class specify in &lt;b style="color: purple;"&gt;MENIFEST.MF&lt;/b&gt;&lt;span style="color: purple;"&gt; file(&lt;/span&gt;&lt;b style="color: purple;"&gt;Bundle-Activator&lt;/b&gt;&lt;span style="color: purple;"&gt; entry). &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: purple;"&gt;&lt;u&gt;Start Method:&lt;/u&gt;&lt;/div&gt;The OSGi container calls start method when bundle is starting. We can use this start method for initialized database connection, register a service for other bundle use.&lt;br /&gt;&lt;div style="color: purple;"&gt;&lt;u&gt;Stop Method:&lt;/u&gt;&lt;/div&gt;The OSGi container calls stop method when bundle is stopping. We can use this method for remove services form service registry like clean up process &lt;br /&gt;&lt;br /&gt;&lt;b&gt;MANIFEST.MF&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;Manifest-Version: 1.0&lt;br /&gt;Bundle-ManifestVersion: 2&lt;br /&gt;Bundle-Name: HelloWorld&lt;br /&gt;Bundle-SymbolicName: com.chandana.Hello.HelloWorld&lt;br /&gt;Bundle-Version: 1.0.0.qualifier&lt;br /&gt;Bundle-Activator: com.chandana.hello.helloworld.Activator&lt;br /&gt;Bundle-Vendor: CHANDANA&lt;br /&gt;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&lt;br /&gt;Import-Package: org.osgi.framework;version="1.3.0"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Bundle-ManifestVersion&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;Bundle-ManifestVersion header show the OSGi container that this bundle follows the rules of the OSGi specification. A value of 2 means that the bundle is compliant with OSGi specification Release 4; a value of 1 means that it is compliant with Release 3 or earlier.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Bundle-Name&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt; &amp;nbsp; Bundle-Name header defines a short readable name for bundle.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Bundle-SymbolicName&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;Bundle-SymbolicName header specifies a unique name for the bundle. This is the name you will use while referring a given bundle from other bundles.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Bundle-Version&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bundle-Version header is the version number of the bundle.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Bundle-Vendo&lt;/b&gt;r&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bundle-Vendor header is description of the vendor(foe example it's my name).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Import-Package&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Import-Package is indicate what are the other Java bundle(OSGi) required for this bundle. what we called dependency.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Export-Package&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Export-Package is indicate what are public packages in bundle and those Export-Package can import from other bundle.&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Run the Bundle:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;For Run this project click on &lt;b&gt;Run &lt;/b&gt;--&amp;gt; &lt;b&gt;Run Configuration&lt;/b&gt; , In &lt;b&gt;OSGi Framework&lt;/b&gt;&amp;nbsp; Right click and create&lt;b&gt; new Run Configuration&lt;/b&gt;.&amp;nbsp;&lt;/li&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-ScsovQDX7SY/Tm7sf51hVyI/AAAAAAAAAfY/TaugsG_I1WQ/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="1" height="290" src="http://1.bp.blogspot.com/-ScsovQDX7SY/Tm7sf51hVyI/AAAAAAAAAfY/TaugsG_I1WQ/s400/5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;li&gt;First unchecked the all target platform and Click on &lt;b&gt;Add Required Bundles&lt;/b&gt;. &lt;/li&gt;&lt;li&gt;After that Apply the changes and Run the project by click in&amp;nbsp; Run button.&lt;/li&gt;&lt;li&gt;&amp;nbsp;After Run the project OSGi console display like below.&lt;/li&gt;&lt;/ol&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-fov7YDm3XY4/Tm7tyQRR5YI/AAAAAAAAAfg/93JQvYJU3sc/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="1" height="300" src="http://2.bp.blogspot.com/-fov7YDm3XY4/Tm7tyQRR5YI/AAAAAAAAAfg/93JQvYJU3sc/s640/6.png" width="580" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-qVQN9JxfsrY/Tm7tR8UBF5I/AAAAAAAAAfc/wMKorMsifas/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;OSGi Terminal Commands:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;start &lt;bundle id=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - start the specified bundle(s)&lt;/bundle&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stop &lt;bundle id=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - stop the specified bundle(s)&lt;/bundle&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;uninstall&amp;nbsp; &lt;bundle id=""&gt;- uninstall the specified bundle(s)&lt;/bundle&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;update &lt;bundle id=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - update the specified bundle(s)&lt;/bundle&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;refresh&lt;bundle id=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp; refresh the packages of the specified bundles&lt;/bundle&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;b &lt;bundle id=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - display details for the specified bundle(s)&lt;/bundle&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;headers &lt;bundle id=""&gt;&amp;nbsp;&amp;nbsp; - print bundle headers&lt;/bundle&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;services &amp;nbsp; -&amp;nbsp; display registered service details&lt;/div&gt;&lt;br /&gt;&lt;b style="color: purple;"&gt;&lt;a href="http://osgi-world.googlecode.com/svn/trunk/com.chandana.Hello.HelloWorld/"&gt;Source Code&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In My Next post I will describe how to create dependency based OSGi bundle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-5153594336254959735?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/5153594336254959735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=5153594336254959735' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5153594336254959735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5153594336254959735'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/09/introduction-to-osgijava-modular.html' title='Introduction to OSGi(Java Modular)'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-33SaOaAs-wI/Tm7x2XSz0eI/AAAAAAAAAfk/2DPa1aJ40oI/s72-c/1.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-9062494321664906580</id><published>2011-08-23T22:33:00.005+05:30</published><updated>2011-11-11T21:46:01.123+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Advanced Java questions -4</title><content type='html'>A program which will accept three sentences (one sentence per line) and print the words having Initial Caps within the sentences. Below is an example.&lt;br /&gt;&lt;br /&gt;Here is an example. If the below three sentences are given to the program as input,&lt;br /&gt;&lt;br /&gt;This is a Program&lt;br /&gt;Coding test of Initial Caps&lt;br /&gt;the program Will Test You&lt;br /&gt;&lt;br /&gt;Then, the output would look like:&lt;br /&gt;&lt;br /&gt;This&lt;br /&gt;Program&lt;br /&gt;Coding&lt;br /&gt;Initial&lt;br /&gt;Caps&lt;br /&gt;Will&lt;br /&gt;Test&lt;br /&gt;You&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;br /&gt;&lt;i&gt;Pattern p = Pattern.compile("^[A-Z]");&lt;/i&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-QdcOoMpsj_c/Tmnz8o2EABI/AAAAAAAAAe0/EXdGMWMsklw/s1600/solution.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-QdcOoMpsj_c/Tmnz8o2EABI/AAAAAAAAAe0/EXdGMWMsklw/s1600/solution.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-9062494321664906580?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/9062494321664906580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=9062494321664906580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/9062494321664906580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/9062494321664906580'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/08/advanced-java-questions-4.html' title='Advanced Java questions -4'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-QdcOoMpsj_c/Tmnz8o2EABI/AAAAAAAAAe0/EXdGMWMsklw/s72-c/solution.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-5457801708705771013</id><published>2011-08-23T22:18:00.001+05:30</published><updated>2011-11-11T21:47:14.072+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Advanced Java questions -3</title><content type='html'>Where 1999 is the year and 5 is the numeric sequence of the month (corresponding to June). The program should display the day on which June 28, 1999 fell, and in this case the output will be MONDAY.&lt;br /&gt;&lt;br /&gt;The output should be displayed in uppercase letters.&lt;br /&gt;&lt;br /&gt;Suppose the following INPUT sequence is given to the program:&lt;br /&gt;&lt;br /&gt;1999-5&lt;br /&gt;1998-6&lt;br /&gt;&lt;br /&gt;Then the output should be:&lt;br /&gt;&lt;br /&gt;MONDAY&lt;br /&gt;TUESDAY&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Solution:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;import java.text.DateFormatSymbols;&lt;br /&gt;import java.util.Calendar;&lt;br /&gt;import java.util.Scanner;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class Solution {&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @param args&lt;br /&gt;  */&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;  boolean condition = false;&lt;br /&gt;  do {&lt;br /&gt;   Scanner scanner = new Scanner(System.in);&lt;br /&gt;   String value = scanner.nextLine();&lt;br /&gt;   condition = value.equalsIgnoreCase("exit");&lt;br /&gt;   if(!condition &amp;amp;&amp;amp; value.contains("-")){&lt;br /&gt;    calculate(value);&lt;br /&gt;   }&lt;br /&gt;   System.out.println("Count is: " + condition);&lt;br /&gt;  } while (!condition);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private static void calculate(String value) {&lt;br /&gt;  final String[] input = value.split("-");&lt;br /&gt;  Calendar cl = Calendar.getInstance();&lt;br /&gt;  cl.set(Integer.parseInt(input[0]), Integer.parseInt(input[1]), 28);&lt;br /&gt;  String[] weekdays = new DateFormatSymbols().getWeekdays();&lt;br /&gt;  System.out.println(weekdays[cl.get(Calendar.DAY_OF_WEEK)].toUpperCase());&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-5457801708705771013?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/5457801708705771013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=5457801708705771013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5457801708705771013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5457801708705771013'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/08/advanced-java-questions_23.html' title='Advanced Java questions -3'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-6003645845806226600</id><published>2011-08-23T22:00:00.000+05:30</published><updated>2011-11-11T21:47:43.825+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Advanced java questions -2</title><content type='html'>Write a program that prints the numbers between 258 and 393 (both inclusive) which do not end with 5. The program should print the output so as to have one value per line. The output would therefore follow the below format:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;value1&lt;br /&gt;value2&lt;br /&gt;value3&lt;br /&gt;.&lt;br /&gt;..&lt;br /&gt;.&lt;br /&gt;so on&lt;br /&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;public class Solution2 {&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @param args&lt;br /&gt;  */&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;  // TODO Auto-generated method stub&lt;br /&gt;  int start = 258;&lt;br /&gt;  int end = 393;&lt;br /&gt;  for (int i = start; i &amp;lt; end; i++) {&lt;br /&gt;   if(i%10 !=5){&lt;br /&gt;    System.out.println(i);&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-6003645845806226600?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/6003645845806226600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=6003645845806226600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6003645845806226600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6003645845806226600'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/08/advanced-java-questions-2.html' title='Advanced java questions -2'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-5742937499768469448</id><published>2011-08-23T21:53:00.002+05:30</published><updated>2011-11-11T21:49:01.955+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Advanced Java questions</title><content type='html'>A program which will accept a single pair of strings separated by a comma; the program should calculate the sum of ASCII values of the characters of each string. The program should then subtract the sum of the ASCII values of the second string from the sum of the ASCII values of the first string.&lt;br /&gt;&lt;br /&gt;Suppose the following input is given to the program:&lt;br /&gt;&lt;br /&gt;123ABC,456DEF&lt;br /&gt;&lt;br /&gt;Then the sum of the ASCII values of the characters in '123ABC' is 348 and in '456DEF' it is 366. The Difference between these numbers is 348 – 366 = -18&lt;br /&gt;The corresponding output to be printed by the program is:&lt;br /&gt;&lt;br /&gt;-18&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;import java.util.Scanner;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class Solution {&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @param args&lt;br /&gt;  */&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;  boolean condition = false;&lt;br /&gt;  do {&lt;br /&gt;   Scanner scanner = new Scanner(System.in);&lt;br /&gt;   String value = scanner.nextLine();&lt;br /&gt;   condition = value.equalsIgnoreCase("exit");&lt;br /&gt;   if(!condition &amp;amp;&amp;amp; value.contains(",")){&lt;br /&gt;    calculate(value);&lt;br /&gt;   }&lt;br /&gt;  } while (!condition);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; private static void calculate(String value){&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;   final String[] event1 = value.split(",");&lt;br /&gt;   int ss = 0;&lt;br /&gt;   for ( int i = 0; i &amp;lt; event1[0].length(); ++i ) {&lt;br /&gt;          char c = event1[0].charAt( i );&lt;br /&gt;          ss += (int) c;&lt;br /&gt;          //System.out.println(skype);&lt;br /&gt;         }&lt;br /&gt;   int sd = 0;&lt;br /&gt;   for ( int i = 0; i &amp;lt; event1[1].length(); ++i ) {&lt;br /&gt;          char c = event1[1].charAt( i );&lt;br /&gt;          sd += (int) c;&lt;br /&gt;          //System.out.println(sd);&lt;br /&gt;         }&lt;br /&gt;   System.out.println(ss-sd);&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-5742937499768469448?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/5742937499768469448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=5742937499768469448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5742937499768469448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5742937499768469448'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/08/advanced-java-questions.html' title='Advanced Java questions'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4427580715486622201</id><published>2011-05-19T11:48:00.004+05:30</published><updated>2011-11-11T21:49:29.015+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='AppEngine'/><title type='text'>Google App Engine DataNucleus “does not seem to have been enhanced” Issue</title><content type='html'>I got&amp;nbsp;DataNucleus exception while developing a Google App Engine based Web Application for one of my office clients. Here is the error message.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;javax.jdo.JDOUserException: Persistent class &lt;br /&gt;"Class com.xxxxx.xxxxx.domain.XXXXXUser does not &lt;br /&gt;seem to have been enhanced. You may want to rerun the&lt;br /&gt;enhancer and check for errors in the output."&lt;br /&gt;has no table in the database, but the operation requires it.&lt;br /&gt;Please check the specification of the MetaData for this class.&lt;br /&gt; at &lt;br /&gt;&lt;br /&gt;org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375)&lt;br /&gt; at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:252)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;NestedThrowablesStackTrace:&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;Persistent class "Class com.xxxxx.xxxxx.domain.XXXXXUser&lt;br /&gt;does not seem to have been enhanced.&lt;br /&gt;You may want to rerun the enhancer and &lt;br /&gt;check for errors in the output." has no table in the database,&lt;br /&gt;but the operation requires it.Please check the specification&lt;br /&gt;of the MetaData for this class. org.datanucleus.store.exceptions.NoTableManagedException: &lt;br /&gt;Persistent class "Class com.xxxxx.xxxxx.domain.XXXXXUser does &lt;br /&gt;not seem to have been enhanced.You may want to rerun the enhancer &lt;br /&gt;and check for errors in the output."has no table in the database,&lt;br /&gt; but the operation requires it. &lt;br /&gt;Please check the specification of the MetaData for this class.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;Every time when i am getting the latest version form version&amp;nbsp;control, GAE shows the error. As a solution I had to cut and paste all persistent classes. There were about 30 persistent(Domain) classes.&lt;br /&gt;Finally I found the solution for this issue. There is a special configuration in GAE eclipse plug-in which need to be done, to run the datanucleus enhancer.&lt;br /&gt;&lt;br /&gt;Go to:&lt;br /&gt;&lt;b&gt;Project Settings -&amp;gt; Google -&amp;gt; App Engine -&amp;gt; ORM&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then remove default value(&lt;b&gt;src/&lt;/b&gt;) and configure the source path to persistent file or folder like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-XRscC3NNubc/TdS1seBejXI/AAAAAAAAAY0/ajSFCAaoXIY/ORM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="285" src="http://2.bp.blogspot.com/-XRscC3NNubc/TdS1seBejXI/AAAAAAAAAY0/ajSFCAaoXIY/s320/ORM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4427580715486622201?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4427580715486622201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4427580715486622201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4427580715486622201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4427580715486622201'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/05/google-app-engine-datanucleus-does-not.html' title='Google App Engine DataNucleus “does not seem to have been enhanced” Issue'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-XRscC3NNubc/TdS1seBejXI/AAAAAAAAAY0/ajSFCAaoXIY/s72-c/ORM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-637843539482641334</id><published>2011-05-05T11:33:00.000+05:30</published><updated>2011-11-11T21:49:41.976+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>How to parse toString date value to Date object</title><content type='html'>I have some issue with toString date value parse to Date object. here is my solution for that.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;     try {&lt;br /&gt; Date cutterntTime = new Date();&lt;br /&gt; String dateStringValue = cutterntTime.toString();&lt;br /&gt; //String dateStringValue = Thu May 05 11:26:49 IST 2011;&lt;br /&gt; DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");&lt;br /&gt; Date date = (Date)formatter.parse(dateStringValue);&lt;br /&gt;&lt;br /&gt; System.out.println("Date Value is : " + date);&lt;br /&gt;     } catch (ParseException e){&lt;br /&gt; System.out.println("Exception :"+e);&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-637843539482641334?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/637843539482641334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=637843539482641334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/637843539482641334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/637843539482641334'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/05/how-to-parse-tostring-date-value-to.html' title='How to parse toString date value to Date object'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-1340609144795510208</id><published>2011-03-28T12:22:00.001+05:30</published><updated>2011-11-11T21:50:13.153+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>How do I get dates between two dates?</title><content type='html'>In the following example code I am going to get &amp;nbsp;dates between two dates. First, I need to convert the date value into milliseconds and increase startup date value from one date.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;One date in&amp;nbsp;milliseconds equlas to&amp;nbsp;24 * 60 * 60 * 1000L&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;import java.util.*;&lt;br /&gt;&lt;br /&gt;public class DateUtil {&lt;br /&gt; static final long ONE_DAY = 24 * 60 * 60 * 1000L;&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;  getDatesBetween("03/23/2011","03/28/2011");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void getDatesBetween(String startDate,String endDate) {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        long  from=Date.parse(startDate);  // long value of from date&lt;br /&gt;&lt;br /&gt;        long to=Date.parse(endDate);     // long value of to date&lt;br /&gt;&lt;br /&gt;        int x=0;&lt;br /&gt;&lt;br /&gt;        while(from &amp;lt;= to) {&lt;br /&gt;              x=x+1;&lt;br /&gt;              System.out.println ("Dates  : "+new Date(from));&lt;br /&gt;              from += ONE_DAY;&lt;br /&gt;        }&lt;br /&gt;        System.out.println ("No of Dates  :"+ x);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-1340609144795510208?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/1340609144795510208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=1340609144795510208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1340609144795510208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1340609144795510208'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/03/how-do-i-get-dates-between-two-dates.html' title='How do I get dates between two dates?'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-1594442440917819465</id><published>2011-03-28T11:29:00.002+05:30</published><updated>2011-11-11T21:50:57.953+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java Hex Color Code Generator</title><content type='html'>Last week I got an ideas on a random color generator in Java. One of my friends asked me to implement this logic.&lt;br /&gt;&lt;br /&gt;Here is my example hexadecimal color code generate logic. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;public Map hexCodeGenerator(int colorCount){&lt;br /&gt;  int maxColorValue = 16777215;&lt;br /&gt;  // this is decimal value of the "FFFFFF"&lt;br /&gt;&lt;br /&gt;  int devidedvalue = maxColorValue/colorCount;&lt;br /&gt;&lt;br /&gt;  int countValue = 0;&lt;br /&gt;&lt;br /&gt;  HashMap hexColorMap = new HashMap();&lt;br /&gt;&lt;br /&gt;  for(int a=0; a &lt; colorCount &amp;&amp; maxColorValue &gt;= countValue ; a++){&lt;br /&gt;   if(a != 0){&lt;br /&gt;    countValue+=devidedvalue;&lt;br /&gt;    hexColorMap.put(a,Integer.toHexString( 0x10000 | countValue).substring(1).toUpperCase());&lt;br /&gt;&lt;br /&gt;   }else{&lt;br /&gt;    hexColorMap.put(a,Integer.toHexString( 0x10000 | countValue).substring(1).toUpperCase());&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;  return hexColorMap;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Or You can use Math.random also. Here is example using Math.random &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;public static Map randomCodeGenerator(int colorCount){&lt;br /&gt;  HashMap hexColorMap = new HashMap();&lt;br /&gt;  for(int a=0;a &lt; colorCount; a++){&lt;br /&gt;   String code = ""+(int)(Math.random()*256);&lt;br /&gt;   code = code+code+code;&lt;br /&gt;   int  i = Integer.parseInt(code);&lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;   hexColorMap.put(a,Integer.toHexString( 0x1000000 | i).substring(1).toUpperCase());&lt;br /&gt;  }&lt;br /&gt; return hexColorMap;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;!-- Place this tag in your head or just before your close body tag --&gt;&lt;script type="text/javascript" src="https://apis.google.com/js/plusone.js"&gt;&lt;/script&gt;&lt;!-- Place this tag where you want the +1 button to render --&gt;help my site stand out : &lt;g:plusone&gt;&lt;/g:plusone&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-1594442440917819465?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/1594442440917819465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=1594442440917819465' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1594442440917819465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1594442440917819465'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/03/java-hex-color-code-generator.html' title='Java Hex Color Code Generator'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-8549009866273709278</id><published>2011-02-23T10:08:00.001+05:30</published><updated>2011-09-11T06:55:45.792+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java HTTPS Client</title><content type='html'>&lt;b&gt;Here is example for a Java HTTPS client&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;import java.net.URL;&lt;br /&gt;import java.io.*;&lt;br /&gt;import javax.net.ssl.HttpsURLConnection;&lt;br /&gt;&lt;br /&gt;public class HttpsClient{&lt;br /&gt;  public static void main(String[] args) throws Exception{&lt;br /&gt;    String httpsURL = "https://encrypted.google.com/";&lt;br /&gt;    URL myurl = new URL(httpsURL);&lt;br /&gt;    HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection();&lt;br /&gt;    InputStream ins = con.getInputStream();&lt;br /&gt;    InputStreamReader isr = new InputStreamReader(ins);&lt;br /&gt;    BufferedReader in = new BufferedReader(isr);&lt;br /&gt;&lt;br /&gt;    String inputLine;&lt;br /&gt;&lt;br /&gt;    while ((inputLine = in.readLine()) != null) {&lt;br /&gt;      System.out.println(inputLine);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    in.close();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-8549009866273709278?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/8549009866273709278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=8549009866273709278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8549009866273709278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8549009866273709278'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2011/02/java-https-client.html' title='Java HTTPS Client'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-2445727966196137145</id><published>2010-08-28T13:13:00.005+05:30</published><updated>2011-11-11T21:51:43.282+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Huawei E220'/><title type='text'>How to Unlock Any Huawei Modem</title><content type='html'>1). - Find the IMEI number &lt;br /&gt;&lt;br /&gt;2). type this on web browser | http://bb5.at/huawei.php?imei=DEVICE_IMEI&lt;br /&gt;&lt;br /&gt;3). Unlock code should display like this&lt;br /&gt;IMEI: XXXXXXXXXXXXXXXXXX&lt;br /&gt;» Unlock: 61949385&lt;br /&gt;» Flash: 46034704&lt;br /&gt;(c) SERGEY/MKL 2010&lt;br /&gt;&lt;br /&gt;4).&amp;nbsp; Enter the unlock code in &lt;a href="http://www.sfrentreprises.fr/elements/documents/espace-utilisateur/global_access/Huawei_E220.zip"&gt; Unlocker &lt;/a&gt;or Any Unlocking Software and Unlock the Device&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is totally free Don't waste your money on Unlocking software&lt;br /&gt;&lt;br /&gt;Softwares:&lt;br /&gt;&lt;a href="http://www.megaupload.com/?d=EFZIVV9E"&gt;Unlocker 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.megaupload.com/?d=I4CUVO6Q"&gt;Unlocker 2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.megaupload.com/?d=UY29G5HE"&gt;Doc &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-2445727966196137145?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/2445727966196137145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=2445727966196137145' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/2445727966196137145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/2445727966196137145'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/08/how-to-unlock-any-huawei-modem.html' title='How to Unlock Any Huawei Modem'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-7295807940780148941</id><published>2010-08-13T12:44:00.004+05:30</published><updated>2011-07-01T14:11:55.904+05:30</updated><title type='text'>Mobitel MMS Settings For Android</title><content type='html'>&lt;b&gt;Setting up the handset for Internet&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Select Settings.&lt;br /&gt;Select Wireless &amp;amp; networks or Wireless controls (older versions).&lt;br /&gt;Select Mobile networks.&lt;br /&gt;Select Access point names.&lt;br /&gt;Press the Menu, --&amp;gt; New APN&lt;br /&gt;Select enter Name (Mobitel or something). Press ok&lt;br /&gt;APN: &lt;b&gt;mobitel3g &lt;/b&gt;or &lt;b&gt;mobitelbb&lt;/b&gt; and press OK.&lt;br /&gt;Select, &lt;b&gt;APN type&lt;/b&gt;, enter &lt;b&gt;internet &lt;/b&gt;or&lt;b&gt; default&lt;/b&gt; and press OK.&lt;br /&gt;Other information not necessary.&lt;br /&gt;Press the &lt;b&gt;Menu &lt;/b&gt;and select &lt;b&gt;Save&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Setting up the handset for MMS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;On the handset, press the Menu key.&lt;br /&gt;Select Settings.&lt;br /&gt;Select Wireless &amp;amp; networks or Wireless controls (older versions).&lt;br /&gt;Select Mobile networks.&lt;br /&gt;Press the Menu, enter Mobitel MMS or something.&lt;br /&gt;APN:&amp;nbsp;&lt;b&gt;wapmms&lt;/b&gt;&amp;nbsp;and press OK&lt;br /&gt;Scroll to, and select, &lt;b&gt;Proxy&lt;/b&gt;, enter &lt;b&gt;192.168.050.163&lt;/b&gt; and press OK.&lt;br /&gt;Scroll to, and select, &lt;b&gt;Port&lt;/b&gt;, enter &lt;b&gt;8080 &lt;/b&gt;and press OK.&lt;br /&gt;Scroll to, and select, User name, enter Not Required and press OK.&lt;br /&gt;Scroll to, and select, Password, enter Not Required and press OK.&lt;br /&gt;Scroll to, and select, &lt;b&gt;MMSC&lt;/b&gt;, &lt;b&gt;http://192.168.050.165&lt;/b&gt; and press OK.&lt;br /&gt;Scroll to, and select, &lt;b&gt;MMS Proxy&lt;/b&gt;, &lt;b&gt;192.168.050.163&lt;/b&gt; and press OK.&lt;br /&gt;Scroll to, and select, &lt;b&gt;MMS Port&lt;/b&gt; , &lt;b&gt;8080 &lt;/b&gt;and press OK. &lt;br /&gt;Scroll to, and select, &lt;b&gt;APN type&lt;/b&gt;, enter &lt;b&gt;mms &lt;/b&gt;and press OK.&lt;br /&gt;Press the Menu and select Save.&lt;br /&gt;&lt;br /&gt;&lt;!-- Place this tag in your head or just before your close body tag --&gt;&lt;br /&gt;&lt;script type="text/javascript" src="https://apis.google.com/js/plusone.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- Place this tag where you want the +1 button to render --&gt;&lt;br /&gt;help my site stand out : &lt;g:plusone&gt;&lt;/g:plusone&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-7295807940780148941?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/7295807940780148941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=7295807940780148941' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7295807940780148941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7295807940780148941'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/08/mobitel-mms-settings-for-android-mobile.html' title='Mobitel MMS Settings For Android'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-5890511833903844986</id><published>2010-07-17T13:16:00.001+05:30</published><updated>2012-01-09T09:13:28.188+05:30</updated><title type='text'>Secure SMS Android Application</title><content type='html'>&lt;b&gt;What is Secure SMS?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Secure SMS is a Messaging application which provides you a Secure SMS messaging service. You can send and receive Secure SMS via this application. Messages can be sent to a person who has this Secure SMS app and to a person who does not has this app.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OJLCBDmkVuk/TEFf05Tt4HI/AAAAAAAAAXI/x2NfIMgajQI/s1600/Untitled-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OJLCBDmkVuk/TEFf05Tt4HI/AAAAAAAAAXI/x2NfIMgajQI/s320/Untitled-1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;User can configure application password when application opened in first time.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-DMSb4JKO30w/TwZw6PRa6lI/AAAAAAAAAhQ/IuGMvVVeXNQ/s1600/device-2012-01-06-091600.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-DMSb4JKO30w/TwZw6PRa6lI/AAAAAAAAAhQ/IuGMvVVeXNQ/s320/device-2012-01-06-091600.png" width="213" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-Tt4TRLaEbdQ/TwZw5Vx2rPI/AAAAAAAAAhM/fNzNjgwSG4o/s1600/device-2012-01-06-091539.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-Tt4TRLaEbdQ/TwZw5Vx2rPI/AAAAAAAAAhM/fNzNjgwSG4o/s320/device-2012-01-06-091539.png" width="213" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/-w3F7DTQSWuA/TwZ2gv__48I/AAAAAAAAAio/79oqaP7SycE/s1600/device-2012-01-06-095001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-w3F7DTQSWuA/TwZ2gv__48I/AAAAAAAAAio/79oqaP7SycE/s320/device-2012-01-06-095001.png" width="213" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-KKfY7kSMbbE/TwZ2pQ3bC7I/AAAAAAAAAi0/lOxsU1mL4L8/s1600/device-2012-01-06-092536.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-KKfY7kSMbbE/TwZ2pQ3bC7I/AAAAAAAAAi0/lOxsU1mL4L8/s320/device-2012-01-06-092536.png" width="213" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Inbox&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Inbox will show you, the Messages which received by you from Secure SMS application or from configured number. You can delete inbox message by Context Menu(&lt;span class="st"&gt;To show a &lt;i&gt;context menu&lt;/i&gt; on long  click)&lt;/span&gt;. By clicking on each message you can view full message body, sender and sent time.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-x_GdcF52mHY/TwZyLD8nRWI/AAAAAAAAAhg/uAzDKm-_yNE/s1600/device-2012-01-06-092358.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-x_GdcF52mHY/TwZyLD8nRWI/AAAAAAAAAhg/uAzDKm-_yNE/s320/device-2012-01-06-092358.png" width="213" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;b&gt;OutBox&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Outbox will show you,&amp;nbsp; the Messages which sent by you. You can delete inbox message by Context Menu(&lt;span class="st"&gt;To show a &lt;i&gt;context menu&lt;/i&gt; on long  click)&lt;/span&gt;. By clicking on each message you can view full message body , receiver and sent time.&lt;br /&gt;&lt;br /&gt;&lt;span id="goog_1230685520"&gt;&lt;/span&gt;&lt;span id="goog_1230685521"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-txfMdFopSLY/TwpiTqfZiZI/AAAAAAAAAjE/QoDU91Wc250/s1600/device-2012-01-06-092426.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-txfMdFopSLY/TwpiTqfZiZI/AAAAAAAAAjE/QoDU91Wc250/s320/device-2012-01-06-092426.png" width="213" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/-scBURHhKe2Q/TwpiQ-PpEEI/AAAAAAAAAi8/S5-zEPc4BaI/s1600/sms.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-scBURHhKe2Q/TwpiQ-PpEEI/AAAAAAAAAi8/S5-zEPc4BaI/s320/sms.png" width="213" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Send SMS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you are sending a SMS you can directly type receiver's number or you can select from "Select Contact" menu. If receiver is your Non Secure SMS number then message send as normal SMS and it will skip you normal SMS conversations. Otherwise message will be send as Secured SMS. That message content will be encrypted and never be able to break it content. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-0rLWy8HyeQI/TwZ0v3GF6-I/AAAAAAAAAhs/VsowoKZ8qDM/s1600/device-2012-01-06-092435.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-0rLWy8HyeQI/TwZ0v3GF6-I/AAAAAAAAAhs/VsowoKZ8qDM/s320/device-2012-01-06-092435.png" width="213" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-bxb_OQhviOc/TwZ0ybHWQ7I/AAAAAAAAAh0/_MYITCRIjaI/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-bxb_OQhviOc/TwZ0ybHWQ7I/AAAAAAAAAh0/_MYITCRIjaI/s320/6.png" width="193" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Change Application Preferences&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can change your application password through help icon.Help icon will display in top right corner. Click on preference menu for configure Application notification and add non Secure SMS number. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-653WQpm_ISo/TwZ1jWX0DdI/AAAAAAAAAiA/Lm3rNClSZpE/s1600/device-2012-01-06-091638.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-653WQpm_ISo/TwZ1jWX0DdI/AAAAAAAAAiA/Lm3rNClSZpE/s320/device-2012-01-06-091638.png" width="213" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/-V9aWmFTPFv4/TwZ1lJ1rmeI/AAAAAAAAAiI/HmcU1Nap3-s/s1600/device-2012-01-06-091754.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-V9aWmFTPFv4/TwZ1lJ1rmeI/AAAAAAAAAiI/HmcU1Nap3-s/s320/device-2012-01-06-091754.png" width="213" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&amp;nbsp;&lt;a href="http://2.bp.blogspot.com/-ko5QRA7PI4E/TwZ2FF2-kPI/AAAAAAAAAiY/QVVgOeclz2g/s1600/device-2012-01-06-092029.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-ko5QRA7PI4E/TwZ2FF2-kPI/AAAAAAAAAiY/QVVgOeclz2g/s320/device-2012-01-06-092029.png" width="213" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-u13Cc6TzAXY/TwZ2ET1OJ7I/AAAAAAAAAiU/q27S2XN_qGE/s1600/device-2012-01-06-091944.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-u13Cc6TzAXY/TwZ2ET1OJ7I/AAAAAAAAAiU/q27S2XN_qGE/s320/device-2012-01-06-091944.png" width="213" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-5890511833903844986?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/5890511833903844986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=5890511833903844986' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5890511833903844986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5890511833903844986'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/07/secret-sms-android-application.html' title='Secure SMS Android Application'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_OJLCBDmkVuk/TEFf05Tt4HI/AAAAAAAAAXI/x2NfIMgajQI/s72-c/Untitled-1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4004169948689655799</id><published>2010-07-10T18:07:00.003+05:30</published><updated>2010-07-17T15:57:29.351+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>My First Android Application</title><content type='html'>&lt;b&gt;What is android:&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Android is a Linux based Mobile Operating system, which developed by  Google's.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;Two weeks ago I published my first Android Application. I called it  as  Zip/ Postal code Catcher. Why I have used Zip/ Postal ??&amp;nbsp; &lt;span class="wsGrammarSuggestion" id="wsWord0"&gt;Because&lt;/span&gt; some  countries Use  Postal code, and some countries called it as Zip code.Then I named it as  Zip/ Postal Code Catcher. Zip/ Postal Code Catcher is a free android  application.&lt;br /&gt;&lt;br /&gt;Application Features : &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Search Postal codes over 30 countries.&lt;/li&gt;&lt;li&gt;If Provided city name does not match, then it will display the nearest matching  postal  codes.&amp;nbsp; &lt;/li&gt;&lt;li&gt;Using GPS based Postal code search option, you can find &lt;span class="wsGeneralSuggestion" id="wsWord10"&gt;the  nearest&lt;/span&gt; five post-office  codes(sorted with air distance) &lt;/li&gt;&lt;/ol&gt;This Application totally based on JSON web service access. In My first  release GPS based postal code catching option is not included. But last Thursday, I have added GPS based postal code search option. By the way, currently it is being used by &lt;span ui:example="12,000"&gt;707 users :)&amp;nbsp; .&amp;nbsp;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.androlib.com/android.application.com-chandana-postalcode-jzitq.aspx"&gt;&amp;nbsp; Zip/ Postal Code Catcher Information In Androlib...&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4004169948689655799?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4004169948689655799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4004169948689655799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4004169948689655799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4004169948689655799'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/07/my-frist-android-application.html' title='My First Android Application'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-5605295248545271145</id><published>2010-01-28T16:29:00.006+05:30</published><updated>2011-11-10T19:27:50.448+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Spring-Hibernate Maven project- Part 3</title><content type='html'>&lt;b&gt;&lt;span style="font-size: large;"&gt;Hibernate Configuration and Project Deployment&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the &lt;a href="http://cnapagoda.blogspot.com/2010/01/spring-hibernate-maven-project-part-2.html"&gt;previous post&lt;/a&gt; I created the hibernate mapping files for the Person-Address domain classes. In here we are going to create the hibernate configuration file which creates the database connection according to the defined URL, credentials and other properties.&lt;br /&gt;&lt;br /&gt;On the deplyment of the project, the hibernate configuration file is executed through the commands in pom.xml.&lt;br /&gt;&lt;br /&gt;We have to put the hibernate configuration file inside the &lt;b&gt;src/main/resources&lt;/b&gt; directory. For that right cick on the directory, select new, select other. From there expand the hibernate icon and select Hibernate Configuration file (cfg.xml).&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S2FwoV_wzCI/AAAAAAAAATs/EB3ZgIyCOAI/s1600-h/config_1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S2FwoV_wzCI/AAAAAAAAATs/EB3ZgIyCOAI/s320/config_1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Click &lt;b&gt;Next&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OJLCBDmkVuk/S2Fwz9mNb_I/AAAAAAAAAT0/T2QPtWpxkQY/s1600-h/config2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OJLCBDmkVuk/S2Fwz9mNb_I/AAAAAAAAAT0/T2QPtWpxkQY/s320/config2.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Keep the default name "hibernate.cfg.xml" same and click &lt;b&gt;Next&lt;/b&gt;&lt;br /&gt;Give the values in the appeared window give the values as follows.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S2FxRDVv_II/AAAAAAAAAT8/fMfo_zfhURo/s1600-h/config3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S2FxRDVv_II/AAAAAAAAAT8/fMfo_zfhURo/s320/config3.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Make sure to verify your mysql username and password, and enter the corret one according to your mysql configuration. &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;hibernate.cfg.xml&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;hibernate-configuration&gt;&lt;br /&gt;    &lt;session-factory&gt;&lt;br /&gt;        &lt;property name="hibernate.connection.driver_class"&gt;&lt;br /&gt;com.mysql.jdbc.Driver&lt;/property&gt;&lt;br /&gt;        &lt;property name="hibernate.connection.password"&gt;&lt;br /&gt;root&lt;/property&gt;&lt;br /&gt;        &lt;property name="hibernate.connection.url"&gt;&lt;br /&gt;jdbc:mysql://localhost:3306/testdb1&lt;/property&gt;&lt;br /&gt;        &lt;property name="hibernate.connection.username"&gt;&lt;br /&gt;root&lt;/property&gt;&lt;br /&gt;        &lt;property name="hibernate.dialect"&gt;&lt;br /&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt;&lt;br /&gt;        &lt;br /&gt;        &lt;mapping resource="hibernate/Person.hbm.xml"&gt;&lt;br /&gt;        &lt;mapping resource="hibernate/Address.hbm.xml"&gt;&lt;br /&gt;    &lt;/mapping&gt;&lt;br /&gt;&lt;/mapping&gt;&lt;br /&gt;&lt;/session-factory&gt;&lt;/hibernate-configuration&gt;&lt;/pre&gt;&lt;b&gt;Add the mapping resource entries to your hibernate.cfg.xml file as above. &lt;/b&gt;&lt;br /&gt;Here is the directory structureof the project after the hibernate.config.xml file is being added.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S2FgxI3LylI/AAAAAAAAATM/MMhmJe52CWA/s1600-h/config_structure.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S2FgxI3LylI/AAAAAAAAATM/MMhmJe52CWA/s320/config_structure.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Let's add the build elements to the pom.xml file to execute the mapping files and create the tables accordingly.&lt;br /&gt;&lt;br /&gt;append the following etries to the pom.xml file inside the project tags.&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;build&gt;&lt;br /&gt;  &lt;plugins&gt;&lt;br /&gt;   &lt;plugin&gt;&lt;br /&gt;    &lt;groupid&gt;org.apache.maven.plugins&lt;/groupid&gt;&lt;br /&gt;    &lt;artifactid&gt;maven-compiler-plugin&lt;/artifactid&gt;&lt;br /&gt;    &lt;configuration&gt;&lt;br /&gt;     &lt;source&gt;&lt;/source&gt;1.5&lt;br /&gt;     &lt;target&gt;1.5&lt;/target&gt;&lt;br /&gt;    &lt;/configuration&gt;&lt;br /&gt;   &lt;/plugin&gt;&lt;br /&gt;   &lt;plugin&gt;&lt;br /&gt;    &lt;artifactid&gt;maven-resources-plugin&lt;/artifactid&gt;&lt;br /&gt;   &lt;/plugin&gt;&lt;br /&gt;   &lt;plugin&gt;&lt;br /&gt;    &lt;groupid&gt;org.apache.maven.plugins&lt;/groupid&gt;&lt;br /&gt;    &lt;artifactid&gt;maven-eclipse-plugin&lt;/artifactid&gt;&lt;br /&gt;    &lt;version&gt;2.7&lt;/version&gt;&lt;br /&gt;   &lt;/plugin&gt;&lt;br /&gt;   &lt;plugin&gt;&lt;br /&gt;    &lt;groupid&gt;org.codehaus.mojo&lt;/groupid&gt;&lt;br /&gt;    &lt;artifactid&gt;hibernate3-maven-plugin&lt;/artifactid&gt;&lt;br /&gt;   &lt;/plugin&gt;&lt;br /&gt;   &lt;plugin&gt;&lt;br /&gt;    &lt;groupid&gt;org.apache.maven.plugins&lt;/groupid&gt;&lt;br /&gt;    &lt;artifactid&gt;maven-source-plugin&lt;/artifactid&gt;&lt;br /&gt;    &lt;configuration&gt;&lt;br /&gt;     &lt;outputdirectory&gt;target&lt;/outputdirectory&gt;&lt;br /&gt;     &lt;finalname&gt;&lt;br /&gt;     &lt;attach&gt;false&lt;/attach&gt;&lt;br /&gt;    &lt;/finalname&gt;&lt;br /&gt;    &lt;executions&gt;&lt;br /&gt;     &lt;execution&gt;&lt;br /&gt;      &lt;id&gt;make-source-jar&lt;/id&gt;&lt;br /&gt;      &lt;phase&gt;package&lt;/phase&gt;&lt;br /&gt;      &lt;goals&gt;&lt;br /&gt;       &lt;goal&gt;jar&lt;/goal&gt;&lt;br /&gt;      &lt;/goals&gt;&lt;br /&gt;     &lt;/execution&gt;&lt;br /&gt;    &lt;/executions&gt;&lt;br /&gt;   &lt;/configuration&gt;&lt;br /&gt;   &lt;plugin&gt;&lt;br /&gt;    &lt;groupid&gt;org.codehaus.mojo&lt;/groupid&gt;&lt;br /&gt;    &lt;artifactid&gt;hibernate3-maven-plugin &lt;br /&gt;    &lt;/artifactid&gt;&lt;br /&gt;    &lt;version&gt;2.2&lt;/version&gt;&lt;br /&gt;    &lt;executions&gt;&lt;br /&gt;     &lt;execution&gt;&lt;br /&gt;      &lt;phase&gt;process-classes&lt;/phase&gt;&lt;br /&gt;      &lt;goals&gt;&lt;br /&gt;       &lt;goal&gt;hbm2ddl&lt;/goal&gt;&lt;br /&gt;      &lt;/goals&gt;&lt;br /&gt;     &lt;/execution&gt;&lt;br /&gt;    &lt;/executions&gt;&lt;br /&gt;    &lt;dependencies&gt;&lt;br /&gt;     &lt;dependency&gt;&lt;br /&gt;      &lt;groupid&gt;hsqldb&lt;/groupid&gt;&lt;br /&gt;      &lt;artifactid&gt;hsqldb&lt;/artifactid&gt;&lt;br /&gt;      &lt;version&gt;1.8.0.7&lt;/version&gt;&lt;br /&gt;     &lt;/dependency&gt;&lt;br /&gt;     &lt;dependency&gt;&lt;br /&gt;      &lt;groupid&gt;mysql&lt;/groupid&gt;&lt;br /&gt;      &lt;artifactid&gt;mysql-connector-java&lt;/artifactid&gt;&lt;br /&gt;      &lt;version&gt;5.1.6&lt;/version&gt;&lt;br /&gt;     &lt;/dependency&gt;&lt;br /&gt;    &lt;/dependencies&gt;&lt;br /&gt;    &lt;configuration&gt;&lt;br /&gt;     &lt;component&gt;&lt;br /&gt;      &lt;name&gt;hbm2ddl&lt;/name&gt;&lt;br /&gt;     &lt;/component&gt;&lt;br /&gt;     &lt;componentproperties&gt;&lt;br /&gt;      &lt;configurationfile&gt;target/classes/hibernate.cfg.xml &lt;br /&gt;      &lt;/configurationfile&gt;&lt;br /&gt;      &lt;outputfilename&gt;schema.sql&lt;/outputfilename&gt;&lt;br /&gt;      &lt;export&gt;true&lt;/export&gt;&lt;br /&gt;      &lt;format&gt;true&lt;/format&gt;&lt;br /&gt;      &lt;drop&gt;true&lt;/drop&gt;&lt;br /&gt;      &lt;haltonerror&gt;false&lt;/haltonerror&gt;&lt;br /&gt;     &lt;/componentproperties&gt;&lt;br /&gt;    &lt;/configuration&gt;&lt;br /&gt;   &lt;/plugin&gt;&lt;br /&gt;   &lt;plugin&gt;&lt;br /&gt;    &lt;artifactid&gt;maven-checkstyle-plugin&lt;/artifactid&gt;&lt;br /&gt;   &lt;/plugin&gt;&lt;br /&gt;  &lt;/plugin&gt;&lt;br /&gt; &lt;/plugins&gt;&lt;br /&gt;&lt;/build&gt;&lt;/pre&gt;&lt;br /&gt;It is ready to execute the project and one more thing left. Go to mysql command line and create a database called &lt;b&gt;testdb1&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OJLCBDmkVuk/S2FsFiwU8uI/AAAAAAAAATU/Xa5LKTE-gDQ/s1600-h/createdb.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OJLCBDmkVuk/S2FsFiwU8uI/AAAAAAAAATU/Xa5LKTE-gDQ/s320/createdb.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;Deploying the project &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Right click on the project and goto run as--maven install&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the maven console you can examine the execution. It will display the sql of the tables created. If you have followed the things correctly at the end it will display BUILD SUCCESSFUL.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Inside the target directory hibernate/sql will contain the scema.sql file which is a dump file of the created tables. Also the jar files are created. (testapp-0.0.1-SNAPSHOT.jar and tetsapp-0.0.1-SNAPSHOT-source.jar is created)&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S2Ft379AoxI/AAAAAAAAATc/q73H8hhJ_yQ/s1600-h/last_structure.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S2Ft379AoxI/AAAAAAAAATc/q73H8hhJ_yQ/s320/last_structure.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The tables can be viewed through mysql command line.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S2Fv3C1ZLOI/AAAAAAAAATk/xhhkMcpOLtk/s1600-h/showtables.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S2Fv3C1ZLOI/AAAAAAAAATk/xhhkMcpOLtk/s320/showtables.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Comments and Questions are wel come&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-5605295248545271145?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/5605295248545271145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=5605295248545271145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5605295248545271145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5605295248545271145'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/01/spring-hibernate-maven-project-part-3.html' title='Spring-Hibernate Maven project- Part 3'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OJLCBDmkVuk/S2FwoV_wzCI/AAAAAAAAATs/EB3ZgIyCOAI/s72-c/config_1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4572875142994780092</id><published>2010-01-22T17:23:00.007+05:30</published><updated>2011-11-10T19:27:50.437+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Spring-Hibernate Maven project- Part 2</title><content type='html'>&lt;span style="font-size: large;"&gt;Hibernate Mapping &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here the two domain classes have one-to-many relationship. One Person can have many Addresses while one Adress can have only one person. So there is a one-to-many relationship between Person and Address.&lt;br /&gt;&lt;br /&gt;In hibernate we have to create the mapping file for each domain class. The mapping file represents the database table which is mapped with the domain class. The table will be created according to things indicated inside mapping classes.&lt;br /&gt;&lt;br /&gt;Mapping file for Person.java: - Person.hbm.xml&lt;br /&gt;Mapping file for Address.java: - Address.hbm.xml&lt;br /&gt;&lt;br /&gt;Mapping files are located inside &lt;b&gt;src/main/resources&lt;/b&gt;. If you have configured Hibernate to be used inside Eclipse you can simply use it. Otherwise let's configure eclpse for hibrenate.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hibernate-Eclipse Configuration&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Download Hibernate tools from here.&lt;br /&gt;Extract the &lt;i&gt;HibernateTools-3.X.zip&lt;/i&gt; file and put all the files inside the &lt;b&gt;features&lt;/b&gt; folder into the features folder of the eclipse installation directory and put all the files inside the &lt;b&gt;plugins&lt;/b&gt; folder into the plugins folder of the ecilpse installation directory. Restart the eclipse.&lt;br /&gt;&lt;br /&gt;Right click src/main/resource.&lt;br /&gt;Create &lt;b&gt;New --Package &lt;/b&gt;&lt;br /&gt;Create a new package called &lt;b&gt;hibernate.&lt;/b&gt;&lt;br /&gt;Then right click on hibernate package and click&amp;nbsp; &lt;b&gt;New--Other&lt;/b&gt;&lt;br /&gt;In the New wizard Select Hibernate Icon and expand it.&lt;br /&gt;Select &lt;b&gt;Hibernate XML Mapping file (hbm.xml) &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1lu7MK99JI/AAAAAAAAASU/i3PYn6UPRuc/s1600-h/mappingnew.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1lu7MK99JI/AAAAAAAAASU/i3PYn6UPRuc/s320/mappingnew.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Click &lt;b&gt;Next.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Type Person.hbm.xml as the file name.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1lxCgMF4hI/AAAAAAAAASc/VQoDKIKqqNs/s1600-h/hbm.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1lxCgMF4hI/AAAAAAAAASc/VQoDKIKqqNs/s320/hbm.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Click &lt;b&gt;Next&lt;/b&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the Hibernate XML mapping file window, click &lt;b&gt;Browse&lt;/b&gt;. A window will be opened named &lt;b&gt;Select a class to map&lt;/b&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the text field type Person.java. And select the correct class from the comming list of classes.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1lxrbTAtNI/AAAAAAAAASk/MH8bzUfbZsk/s1600-h/map_class.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1lxrbTAtNI/AAAAAAAAASk/MH8bzUfbZsk/s320/map_class.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Click &lt;b&gt;Ok &lt;/b&gt;and Click&lt;b&gt; Finish&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Similarly create the &lt;b&gt;Addrees.hbm.xml &lt;/b&gt;file mapped with Address.java class. &lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Now the project structure will be as follows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OJLCBDmkVuk/S1l6CwkDdjI/AAAAAAAAASs/bq6_5D6B6Qo/s1600-h/structuire_hib.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OJLCBDmkVuk/S1l6CwkDdjI/AAAAAAAAASs/bq6_5D6B6Qo/s320/structuire_hib.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Let's put the content to mapping files.&lt;br /&gt;&lt;b&gt;Person.hbm.xml&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;hibernate-mapping package="org.test.testapp.domain"&gt;&lt;br /&gt;&lt;class name="Person" table="PERSON"&gt;&lt;br /&gt;  &lt;id column="PERSON_ID" name="PersonID" type="long"&gt;&lt;br /&gt;   &lt;generator class="identity"&gt;&lt;/generator&gt;&lt;br /&gt;  &lt;/id&gt;&lt;br /&gt;  &lt;property column="PERSON_NAME" name="Name" type="string"&gt;&lt;br /&gt;  &lt;property column="TEL_NO" name="TelNo" type="string"&gt;&lt;br /&gt;  &lt;set cascade="all" name="AddressList"&gt;&lt;br /&gt;   &lt;key column="PERSON_ID"&gt;&lt;/key&gt;&lt;br /&gt;   &lt;one-to-many class="Address"&gt;&lt;br /&gt;  &lt;/one-to-many&gt;&lt;br /&gt; &lt;/set&gt;&lt;br /&gt;&lt;/property&gt;&lt;br /&gt;&lt;/property&gt;&lt;/class&gt;&lt;br /&gt;&lt;/hibernate-mapping&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Let's see the each an ever tag.&lt;br /&gt;class tag: defines which is the &lt;b&gt;class&lt;/b&gt; being used and&lt;b&gt; table&lt;/b&gt; being mapped for the class.&lt;br /&gt;id tag: An attribute inside class which is going to be primary key of the table (PersonID)&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;name: attribute name of the class&lt;/span&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; type: type of the table column, to match with the class attribute type (Long=long)&lt;br /&gt;&lt;/div&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column: column name of the resulting table&lt;/span&gt;&lt;br /&gt;property tag All the attributes in the class expect lists and id attribute&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;name: attribute name of the class&lt;/span&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; type: type of the table column, to match with the class attribute type (String=string)&lt;br /&gt;&lt;/div&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column: column name of the resulting table&lt;/span&gt; &lt;br /&gt;&amp;nbsp;list tag: The lists inside class &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;name: Name of the List inside the class&lt;/span&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; key tag:Defines the column name of this table which goes as the foriegn key to the Address class&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; one-to-many tag: This describes the one-to-many relationship which creats the List inside class. (One Project has many Addresses)&lt;br /&gt;&lt;/div&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class : One-to-many relationship defining class (Address for Person)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Address.hbm.xml&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;hibernate-mapping package="org.test.testapp.domain"&gt;&lt;br /&gt; &lt;class name="Address" table="ADDRESS"&gt;&lt;br /&gt;  &lt;id column="ADDRESS_ID" name="AddressID" type="long"&gt;&lt;br /&gt;   &lt;generator class="identity"&gt;&lt;br /&gt;  &lt;/generator&gt;&lt;br /&gt;  &lt;br /&gt;  &lt;property column="STREET" name="Street" type="string"&gt;&lt;br /&gt;  &lt;property column="CITY" name="City" type="string"&gt;&lt;br /&gt;  &lt;property column="AREACODE" name="AreaCode" type="string"&gt;&lt;br /&gt;  &lt;br /&gt;  &lt;many-to-one cascade="all" class="Person" name="NewPerson"&gt;&lt;br /&gt; &lt;/many-to-one&gt;&lt;br /&gt;&lt;/property&gt;&lt;br /&gt;&lt;/property&gt;&lt;/property&gt;&lt;/id&gt;&lt;/class&gt;&lt;/hibernate-mapping&gt;&lt;/pre&gt;Respond to the Project class set tag with one-to-many tag, here we have to define the many-to-one tag&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;span style="color: blue;"&gt;name: name of the attribute of class which reffers the Person class&lt;/span&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class: Class with whome this class makes the relationship&lt;br /&gt;&lt;/div&gt;This will be added to the ADDRESS table as column name which defined in Person mapping file.(key column="PERSON_ID") &amp;nbsp; &lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://cnapagoda.blogspot.com/2010/01/spring-hibernate-maven-project-part-3.html"&gt;Next&lt;/a&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4572875142994780092?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4572875142994780092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4572875142994780092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4572875142994780092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4572875142994780092'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/01/spring-hibernate-maven-project-part-2.html' title='Spring-Hibernate Maven project- Part 2'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OJLCBDmkVuk/S1lu7MK99JI/AAAAAAAAASU/i3PYn6UPRuc/s72-c/mappingnew.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4755621887526708192</id><published>2010-01-22T14:06:00.004+05:30</published><updated>2011-11-10T19:27:50.443+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Spring-Hibernate Maven project- Part 1</title><content type='html'>&lt;div style="text-align: left;"&gt;&amp;nbsp;Here the maven project created in &lt;a href="http://cnapagoda.blogspot.com/2010/01/create-simple-maven-project.html"&gt;last post&lt;/a&gt;, will be extended to add new Persons in to system who has multiple Addresses.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Add the Spring Hibernate dependencies into pom.xml file inside project tags, after the version tag.&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;&lt;br /&gt; &lt;modelversion&gt;4.0.0&lt;/modelversion&gt;&lt;br /&gt; &lt;groupid&gt;org.test.testapp&lt;/groupid&gt;&lt;br /&gt; &lt;artifactid&gt;testapp&lt;/artifactid&gt;&lt;br /&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;&lt;br /&gt; &lt;dependencies&gt;&lt;br /&gt;  &lt;dependency&gt;&lt;br /&gt;   &lt;groupid&gt;org.hibernate&lt;/groupid&gt;&lt;br /&gt;   &lt;artifactid&gt;hibernate-core&lt;/artifactid&gt;&lt;br /&gt;   &lt;version&gt;3.3.1.GA&lt;/version&gt;&lt;br /&gt;  &lt;/dependency&gt;&lt;br /&gt;  &lt;dependency&gt;&lt;br /&gt;   &lt;groupid&gt;org.springframework&lt;/groupid&gt;&lt;br /&gt;   &lt;artifactid&gt;spring&lt;/artifactid&gt;&lt;br /&gt;   &lt;version&gt;${springVersion}&lt;/version&gt;&lt;br /&gt;  &lt;/dependency&gt;&lt;br /&gt; &lt;/dependencies&gt;&lt;br /&gt;&lt;/project&gt;&lt;/pre&gt;Dependencies are added, so that once the project install goal is being executed the, needed libraries are added to the project. So we can access the spring and hibernate API's inside our project.&lt;br /&gt;&lt;br /&gt;Now right click the project. Select &lt;b&gt;Run As&lt;/b&gt; and then Select&lt;b&gt; maven install&lt;/b&gt;. Or go to project location through command line and execute&lt;b&gt; mvn install &lt;/b&gt;command. If no errors were found, and you got BUILD SUCCESSFULL, then you have added the dependencies successfully.&lt;br /&gt;&lt;br /&gt;Let's add domain classes to the project. The domain is consist of Person and Address classes.&lt;br /&gt;In maven project directory structure, all the source files will be located in &lt;b&gt;src/main/java&lt;/b&gt; directory. &lt;br /&gt;&lt;br /&gt;Right click on the src/main/java directory and clike New--Class&lt;br /&gt;&lt;br /&gt;Give &lt;b&gt;Person&lt;/b&gt; as the class name and &lt;b&gt;org.test.testapp.domain&lt;/b&gt; as the package name.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1lfVp6VgrI/AAAAAAAAAR0/jNrb68MbpQ0/s1600-h/newclass.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1lfVp6VgrI/AAAAAAAAAR0/jNrb68MbpQ0/s320/newclass.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Now create the Address class inside the same package.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Put the following code inside Address.java.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;package org.test.testapp.domain;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;public class Address {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Long AddressID;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String Street;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String City;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String AreaCode;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Person NewPerson;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Long getAddressID() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return AddressID;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setAddressID(Long addressID) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AddressID = addressID;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Person getNewPerson() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return NewPerson;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setNewPerson(Person newPerson) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; NewPerson = newPerson;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getStreet() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return Street;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setStreet(String street) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Street = street;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getCity() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return City;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setCity(String city) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; City = city;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getAreaCode() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return AreaCode;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setAreaCode(String areaCode) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AreaCode = areaCode;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now put the following code inside Person.java&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fff2cc;"&gt;package org.test.testapp.domain;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;import java.util.List;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;public class Person {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Long PersonID;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String Name;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String TelNo;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private List&lt;/span&gt;&lt;span style="background-color: #fce5cd;"&gt; AddressList;&lt;/span&gt;&lt;br /&gt;&lt;address&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Long getPersonID() {&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return PersonID;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setPersonID(Long personID) {&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PersonID = personID;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getName() {&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return Name;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setName(String name) {&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Name = name;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getTelNo() {&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return TelNo;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setTelNo(String telNo) {&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; TelNo = telNo;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public List&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: #fce5cd;"&gt; getAddressList() {&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;/address&gt;&lt;address&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return AddressList;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setAddressList(ListaddressList) {&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AddressList = addressList;&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="background-color: #fce5cd;" /&gt;&lt;span style="background-color: #fce5cd;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/address&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fce5cd;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;Note: Here the both classes consist of their attributes and the getter setter methods for each attribute. For implemet the hibernate connction to thses classes you must follow this coding standard where attributes kept private and getter setter methods fr each attribute kept public.&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Here is the new structural view of the project after adding 2 domain classes.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OJLCBDmkVuk/S1ljDfIPpCI/AAAAAAAAASE/WfjdZOJky6Y/s1600-h/new_structure.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OJLCBDmkVuk/S1ljDfIPpCI/AAAAAAAAASE/WfjdZOJky6Y/s320/new_structure.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In the &lt;a href="http://cnapagoda.blogspot.com/2010/01/spring-hibernate-maven-project-part-2.html"&gt;next part&lt;/a&gt; let's see how to implement the hibernate mapping classes for these domain classes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4755621887526708192?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4755621887526708192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4755621887526708192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4755621887526708192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4755621887526708192'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/01/spring-hibernate-maven-project-part-1.html' title='Spring-Hibernate Maven project- Part 1'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_OJLCBDmkVuk/S1lfVp6VgrI/AAAAAAAAAR0/jNrb68MbpQ0/s72-c/newclass.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-325467970757236551</id><published>2010-01-22T09:59:00.010+05:30</published><updated>2011-11-10T19:27:50.432+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Create a Simple Maven Project</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Open Eclipse.&lt;br /&gt;&lt;div style="border: medium none;"&gt;Create a new maven project. &lt;b&gt;File--New--Other&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border: medium none;"&gt;New Wizard will open. There go to maven icon and expand it. Then Select &lt;b&gt;Maven Project&lt;/b&gt; item.&lt;br /&gt;&lt;/div&gt;&lt;div style="border: medium none;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OJLCBDmkVuk/S1lke_H3MeI/AAAAAAAAASM/i6vmomGWbpA/s1600-h/new_project.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OJLCBDmkVuk/S1lke_H3MeI/AAAAAAAAASM/i6vmomGWbpA/s320/new_project.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page Section1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.Section1	{page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Click &lt;b&gt;Next&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;In the New Maven Project wizard, select the&lt;b&gt; create a simple project (skip archetype selection)&lt;/b&gt; check box.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="border: medium none; text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1klTm53wTI/AAAAAAAAAQk/xAhSB52fFw0/s1600-h/create.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1klTm53wTI/AAAAAAAAAQk/xAhSB52fFw0/s320/create.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Click &lt;b&gt;Next&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the&lt;b&gt; New Maven Project &lt;/b&gt;wizard enter the following values.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page Section1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.Section1	{page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Group Id: org.test.testapp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Artifact Id: testapp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Version: 0.0.1-SNAPSHOT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Packaging: jar&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1kq64P6xPI/AAAAAAAAARk/fY-l5e5hYOk/s1600-h/project_name.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1kq64P6xPI/AAAAAAAAARk/fY-l5e5hYOk/s320/project_name.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page Section1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.Section1	{page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Click &lt;b&gt;Finish.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page Section1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.Section1	{page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;New Maven Project will be created and display in the Project Explore. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Here is the initial project structure of the created simple Maven project with a jar packaging.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1knk4uQubI/AAAAAAAAARE/d5bxuzCmBg8/s1600-h/initial+structure.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1knk4uQubI/AAAAAAAAARE/d5bxuzCmBg8/s320/initial+structure.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&amp;nbsp; Pom.xml file will contain the following initial details&lt;m:smallfrac m:val="off"&gt;&lt;m:dispdef&gt;&lt;m:lmargin m:val="0"&gt;&lt;m:rmargin m:val="0"&gt;&lt;m:defjc m:val="centerGroup"&gt;&lt;m:wrapindent m:val="1440"&gt;&lt;m:intlim m:val="subSup"&gt;&lt;m:narylim m:val="undOvr"&gt;&lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page Section1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.Section1	{page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;project&gt;&lt;br /&gt;	&lt;modelversion&gt;4.0.0&lt;/modelVersion&gt;&lt;br /&gt;	&lt;groupid&gt;org.test.testapp&lt;/groupId&gt;&lt;br /&gt;	&lt;artifactid&gt;testapp&lt;/artifactId&gt;&lt;br /&gt;	&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;&lt;br /&gt;&lt;/project&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;b&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page Section1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.Section1	{page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;b&gt;Run the Project&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Executing Maven Goals.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Right Click on the testapp.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Select Run as&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Here you can see the configured goals.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Maven install, Maven clean etc&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;maven install goal will install all the necessary dependancies inside pom.xml and create the packaging file which is jar or war file.&lt;br /&gt;&lt;/div&gt;&lt;div style="border: medium none; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border: medium none; text-align: left;"&gt;In this project we haven't done anything.&lt;br /&gt;&lt;/div&gt;&lt;div style="border: medium none; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border: medium none; text-align: left;"&gt;In the next post I will show you haow to create a simple spring-hibernate project. &lt;br /&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="border: medium none; clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="border: medium none; clear: both; text-align: left;"&gt;After we creating the project inside eclipse we can run the application even through command line, if you have &lt;a href="http://cnapagoda.blogspot.com/2010/01/installing-apache-maven-and-configuring.html"&gt;installed Apache Maven in to you PC&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="border: medium none; clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="border: medium none; clear: both; text-align: left;"&gt;For that you have to open commandline and go to the project directory thorugh command line and execute the mvn commands such as mvn clean, mvn install, etc.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="border: medium none; clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="border: medium none; clear: both; text-align: left;"&gt;ex: %testapp&amp;gt; &lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page Section1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.Section1	{page:Section1;}--&gt;&lt;/style&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;mvn install&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="border: medium none; clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="border: medium none; clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-325467970757236551?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/325467970757236551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=325467970757236551' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/325467970757236551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/325467970757236551'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/01/create-simple-maven-project.html' title='Create a Simple Maven Project'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_OJLCBDmkVuk/S1lke_H3MeI/AAAAAAAAASM/i6vmomGWbpA/s72-c/new_project.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-2260364767866054717</id><published>2010-01-21T17:27:00.004+05:30</published><updated>2011-11-24T12:10:31.585+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Installing Apache Maven and Configuring Eclipse with Maven</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;Installing Maven into your PC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;Download Maven from &lt;strike&gt;&lt;a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.2.1-bin.zip"&gt;here&lt;/a&gt;&lt;/strike&gt;.&lt;a href="http://maven.apache.org/download.html"&gt;MavenDownload&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;Unzip the file and put into Program files. So the Maven path would be &lt;span style="color: #20124d;"&gt;C:\Program Files\apache-maven-2.2.1&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Setting the Maven Environment Varable&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Right click &lt;b&gt;My Computer&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Go to advanced tab&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Click “&lt;b&gt;Environment Variables&lt;/b&gt;” button&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;In the &lt;b&gt;System variables&lt;/b&gt; click &lt;b&gt;new&lt;/b&gt; button. Set the path to Maven directory and give &lt;b&gt;M2_HOME&lt;/b&gt; as variable name as follows.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1g9Dxj_G5I/AAAAAAAAAPc/v4wBSysJ2Ug/s1600-h/path.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1g9Dxj_G5I/AAAAAAAAAPc/v4wBSysJ2Ug/s320/path.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Click ok.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Now from the System Variable set select “Path” variable and click edit.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Add the&lt;b&gt; ;% M2_HOME%/bin;&lt;/b&gt; at the end of path value as follows.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1g9MFkS-pI/AAAAAAAAAPk/DdkxYBEY6Ks/s1600-h/pathpath.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1g9MFkS-pI/AAAAAAAAAPk/DdkxYBEY6Ks/s320/pathpath.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Click ok.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Verify the Installation&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;Open command line and type &lt;b&gt;mvn&lt;/b&gt; command.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/S1g927QTlcI/AAAAAAAAAPs/2NKSrxnYOw8/s1600-h/mvn.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1g-G-2pB6I/AAAAAAAAAP0/zpzXuNQP7w8/s1600-h/mvn.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1g-G-2pB6I/AAAAAAAAAP0/zpzXuNQP7w8/s320/mvn.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Eclipse-Maven Configuration&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;Note that for Eclipse Update for Maven does not require Apache Maven to be installed to your PC.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--&gt;&lt;/style&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11pt; line-height: 115%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: 11pt; line-height: 115%;"&gt;First download eclipse 3.4.0 from &lt;/span&gt;&lt;strike&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;here &lt;/span&gt;&lt;/span&gt;&lt;/strike&gt;&lt;a href="http://www.eclipse.org/downloads/"&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;L&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;atest Eclipse Download&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;strike&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strike&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;Then after the Eclipse installation update the Eclipse for &lt;b&gt;m2Eclipse&lt;/b&gt; plug-in. Then you can work with maven inside Eclipse IDE.&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;}@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:.5in; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:.5in; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:892085023; mso-list-type:hybrid; mso-list-template-ids:1230521644 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}@list l0:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;}ol {margin-bottom:0in;}ul {margin-bottom:0in;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/div&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;Run Eclipse&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt; &lt;/span&gt;Go to Help&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;li&gt;Software Updates&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1g_V0_1cGI/AAAAAAAAAP8/P9HJtxtOa3w/s1600-h/update.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S1g_V0_1cGI/AAAAAAAAAP8/P9HJtxtOa3w/s320/update.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;Click &lt;b&gt;Add Sites &lt;/b&gt;and in the opening window give the following URL.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="font-family: Arial,Helvetica,sans-serif; text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="font-family: Arial,Helvetica,sans-serif; text-indent: -0.25in;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; &lt;strike&gt;http://m2eclipse.sonatype.org/update/&lt;/strike&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;http://download.eclipse.org/technology/m2e/releases&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OJLCBDmkVuk/S1g_0u2z_XI/AAAAAAAAAQE/P-z1fAkcT9U/s1600-h/site.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OJLCBDmkVuk/S1g_0u2z_XI/AAAAAAAAAQE/P-z1fAkcT9U/s320/site.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;Click Ok&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Then Select Maven Integration for Eclipse Update Site from the site list and click &lt;/span&gt;&lt;b style="font-family: Arial,Helvetica,sans-serif;"&gt;install&amp;nbsp; &lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OJLCBDmkVuk/S1hANJvRhjI/AAAAAAAAAQM/ElDmQNp6RaI/s1600-h/select.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OJLCBDmkVuk/S1hANJvRhjI/AAAAAAAAAQM/ElDmQNp6RaI/s320/select.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: left;"&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif;"&gt;After the successful update the eclipse will be asked for restart. Restart it. Now you can ensure the maven update by opening maven console.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;}@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:.5in; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:.5in; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:434398420; mso-list-type:hybrid; mso-list-template-ids:-1267145438 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}@list l0:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;}ol {margin-bottom:0in;}ul {margin-bottom:0in;}--&gt;&lt;/style&gt;&lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/div&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt; &lt;/span&gt;Go to &lt;b&gt;Window &lt;/b&gt;icon from the menu bar&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt; &lt;/span&gt;Select &lt;b&gt;Show view&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;li&gt;Select &lt;b&gt;Console&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: large;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Clakmali.b%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}.MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Eclipse console will be opened. In the console click “Open Console menu”. There you can see maven console selection. Select it. Console will change to maven console. &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OJLCBDmkVuk/S1hAzeyWSdI/AAAAAAAAAQU/6XxSdRGzBNk/s1600-h/console.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OJLCBDmkVuk/S1hAzeyWSdI/AAAAAAAAAQU/6XxSdRGzBNk/s320/console.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_url = 'http://www.dzone.com/links/installing_apache_maven_and_configuring_eclipse_w.html';&lt;/script&gt;&lt;script type="text/javascript"&gt;var dzone_title = 'Installing Apache Maven and Configuring Eclipse with Maven';&lt;/script&gt;&lt;script type="text/javascript"&gt;var dzone_blurb = 'Installing Apache Maven and Configuring Eclipse with Maven step by step guide. ';&lt;/script&gt;&lt;script type="text/javascript"&gt;var dzone_style = '2';&lt;/script&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"&gt;&lt;/script&gt; &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-2260364767866054717?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/2260364767866054717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=2260364767866054717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/2260364767866054717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/2260364767866054717'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/01/installing-apache-maven-and-configuring.html' title='Installing Apache Maven and Configuring Eclipse with Maven'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OJLCBDmkVuk/S1g9Dxj_G5I/AAAAAAAAAPc/v4wBSysJ2Ug/s72-c/path.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4255883514600956349</id><published>2010-01-06T14:35:00.004+05:30</published><updated>2011-09-11T06:57:20.989+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Thread Synchronization</title><content type='html'>When multiple threads are accessing a common method through their run methods, the output of that particular program is unpredictable, because while one thread is gone half way through the common method, another thread would gain the common method.&lt;br /&gt;&lt;br /&gt;Similarly the common method execution result of multiple threads can have a variety and also may attack to the accuracy of the expected result.&lt;br /&gt;&lt;br /&gt;If you need to let the common method accessible by one thread at one time you have to done it through synchronization.&lt;br /&gt;&lt;br /&gt;Imagine you expect to increase the value of number in Thread A, and the value of number Thread B by one via calling the common method count().&lt;br /&gt;&lt;br /&gt;Examine the following code and see the result by executing it.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;class SynchDemo{&lt;br /&gt;    int common=7;&lt;br /&gt;    public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;        SynchDemo demo=new SynchDemo();&lt;br /&gt;&lt;br /&gt;        A a =new A();&lt;br /&gt;        a.active(demo);&lt;br /&gt;        a.start();&lt;br /&gt;&lt;br /&gt;        B b=new B();&lt;br /&gt;        b.active(demo);&lt;br /&gt;        b.start();&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int count(int x){&lt;br /&gt;        common=x;&lt;br /&gt;        try{&lt;br /&gt;            Thread.sleep(1000);&lt;br /&gt;        }catch(Exception ee){&lt;br /&gt;        }&lt;br /&gt;        return ++common;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class A extends Thread{&lt;br /&gt;    int number=5;&lt;br /&gt;    SynchDemo demo;&lt;br /&gt;&lt;br /&gt;    public void run(){&lt;br /&gt;        System.out.println("Start Thread A\n");&lt;br /&gt;        System.out.println("A before increase:"+number+"\n");&lt;br /&gt;        System.out.println("A after increase by one:"+demo.count(number)+"\n");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void active(SynchDemo demo){&lt;br /&gt;        this.demo=demo;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class B extends Thread{&lt;br /&gt;    int number=10;&lt;br /&gt;    SynchDemo demo;&lt;br /&gt;&lt;br /&gt;    public void run(){&lt;br /&gt;        System.out.println("Start Thread B\n");&lt;br /&gt;        System.out.println("B before increase:"+number+"\n");&lt;br /&gt;        System.out.println("B after increase by one:"+demo.count(number)+"\n");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void active(SynchDemo demo){&lt;br /&gt;        this.demo=demo;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;The result can be, &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S0RPn9357AI/AAAAAAAAAPM/axgI7T2o2zI/s1600-h/one.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S0RPn9357AI/AAAAAAAAAPM/axgI7T2o2zI/s320/one.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;The result of the program is wired, try multiple times.&lt;br /&gt;&lt;br /&gt;Increased value of Thread A or Thread B becomes incorrect most of the time.&lt;br /&gt;&lt;br /&gt;That's because another thread enters to the method and the value will be updated by that thread. So the previous thread gets the updated value to increase.Let's use Synchronization....&lt;br /&gt;&lt;br /&gt;In Synchronization we can make a code mutually exclusive to multiple threads through a common object. When we add the key word 'synchronized' before the common method, the Thread which calls the method will put a lock to the object it uses to call the method.&lt;br /&gt;&lt;br /&gt;Examine the following code and see the result.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;br /&gt;&lt;br /&gt;class SynchDemo{&lt;br /&gt;   &lt;br /&gt;    int common=7;&lt;br /&gt;   &lt;br /&gt;    public static void main(String args[]){&lt;br /&gt;       &lt;br /&gt;        SynchDemo demo=new SynchDemo();&lt;br /&gt;       &lt;br /&gt;        A a =new A();&lt;br /&gt;        a.active(demo);&lt;br /&gt;        a.start();&lt;br /&gt;&lt;br /&gt;        B b=new B();&lt;br /&gt;        b.active(demo);&lt;br /&gt;        b.start();&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public synchronized int count(int x){&lt;br /&gt;        common=x;&lt;br /&gt;        try{&lt;br /&gt;            Thread.sleep(1000);&lt;br /&gt;        }catch(Exception ee){&lt;br /&gt;        }&lt;br /&gt;        return ++common;&lt;br /&gt;    }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;class A extends Thread{&lt;br /&gt;    int number=5;&lt;br /&gt;    SynchDemo demo;&lt;br /&gt;&lt;br /&gt;    public void run(){&lt;br /&gt;        System.out.println("Start Thread A\n");&lt;br /&gt;        System.out.println("A before increase:"+number+"\n");&lt;br /&gt;        System.out.println("A after increase by one:"+demo.count(number)+"\n");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void active(SynchDemo demo){&lt;br /&gt;        this.demo=demo;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class B extends Thread{&lt;br /&gt;    int number=10;&lt;br /&gt;    SynchDemo demo;&lt;br /&gt;&lt;br /&gt;    public void run(){&lt;br /&gt;        System.out.println("Start Thread B\n");&lt;br /&gt;        System.out.println("B before increase:"+number+"\n");&lt;br /&gt;        System.out.println("B after increase by one:"+demo.count(number)+"\n");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void active(SynchDemo demo){&lt;br /&gt;        this.demo=demo;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;The result is guranteed to increase the valuse of threads by one.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S0RR3g6egNI/AAAAAAAAAPU/0xMWOMImHCw/s1600-h/two.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S0RR3g6egNI/AAAAAAAAAPU/0xMWOMImHCw/s320/two.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Here the common method is &lt;span style="color: blue;"&gt;count()&lt;/span&gt;. The object used to call the method is ‘&lt;span style="color: blue;"&gt;demo&lt;/span&gt;’. So the first thread which calls the method &lt;span style="color: blue;"&gt;count&lt;/span&gt;(), &lt;span style="color: #ea9999;"&gt;gain the lock of the object &lt;/span&gt;'demo'.&lt;br /&gt;&lt;br /&gt;As next thread also need '&lt;span style="color: blue;"&gt;demo&lt;/span&gt;' object to call method &lt;span style="color: blue;"&gt;count()&lt;/span&gt; it has to &lt;span style="color: #ea9999;"&gt;wait until First thread come out of the synchronized method and release the lock&lt;/span&gt;. Soon The next thread can gain the lock in 'demo' and execute count().&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The most important thing is,&lt;/b&gt;&lt;br /&gt;&lt;i style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;Both methods have used the same object to call the common method. Otherwise synchronizing the method won't help. Try using different objects.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Article Prepared by : &lt;a href="http://java-wisdom.blogspot.com/"&gt;Lakmali Erandi&lt;/a&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4255883514600956349?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4255883514600956349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4255883514600956349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4255883514600956349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4255883514600956349'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/01/thread-synchronization.html' title='Thread Synchronization'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_OJLCBDmkVuk/S0RPn9357AI/AAAAAAAAAPM/axgI7T2o2zI/s72-c/one.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-6942369314229166861</id><published>2010-01-05T14:20:00.004+05:30</published><updated>2011-11-11T21:54:11.321+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Thread join() method</title><content type='html'>&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;method-void join()&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;class-java.lang.Thread&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;non-static&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;throws Interrupted Exception&lt;/div&gt;&lt;br /&gt;The method join can be used to make one thread joined into the end of another thread.This is a guranteed method.&lt;br /&gt;&lt;br /&gt;Examine the following code and see the result.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;class Demo{&lt;br /&gt;    public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;        A a=new A();&lt;br /&gt;        B b=new B();&lt;br /&gt;&lt;br /&gt;        a.start();&lt;br /&gt;        b.start();&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class A extends Thread{&lt;br /&gt;    public void run(){&lt;br /&gt;&lt;br /&gt;        System.out.println("Thread A started");&lt;br /&gt;        System.out.println("Thread A running");&lt;br /&gt;        System.out.println("Thread A ending");&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class B extends Thread{&lt;br /&gt;    public void run() {&lt;br /&gt;&lt;br /&gt;        System.out.println("Thread B started");&lt;br /&gt;        System.out.println("Thread B running");&lt;br /&gt;        System.out.println("Thread B ending");&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Result can not be guessed, as two threads execute separately.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OJLCBDmkVuk/S0L9xP4BKWI/AAAAAAAAAPE/QKHOx1dy7bw/s1600-h/result.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OJLCBDmkVuk/S0L9xP4BKWI/AAAAAAAAAPE/QKHOx1dy7bw/s320/result.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Imagine you want to execute Thread-B after the complete execution of Thread-A. (First Thread A, then Thread B)I am goin to show two comman ways to do that.&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Method (1)&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;You can call join method of Thread-A from the Thread-B.&lt;/li&gt;&lt;li&gt;But make sure a thread A need to started, before calling join method.&lt;/li&gt;&lt;li&gt; Then start the Thread B.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;pre class="brush: js"&gt;class Demo{&lt;br /&gt;    public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        B b=new B();&lt;br /&gt;&lt;br /&gt;        b.starting();&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class A extends Thread{&lt;br /&gt;    public void run(){&lt;br /&gt;&lt;br /&gt;        System.out.println("Thread A started");&lt;br /&gt;        System.out.println("Thread A running");&lt;br /&gt;        System.out.println("Thread A ending");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void starting(){&lt;br /&gt;            this.start();&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class B extends Thread{&lt;br /&gt;    public void run() {&lt;br /&gt;&lt;br /&gt;        System.out.println("Thread B started");&lt;br /&gt;        System.out.println("Thread B running");&lt;br /&gt;        System.out.println("Thread B ending");&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void starting(){&lt;br /&gt;            A a=new A();&lt;br /&gt;            a.starting();&lt;br /&gt;            try{&lt;br /&gt;                a.join();&lt;br /&gt;            }catch(InterruptedException e){&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;            this.start();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Result can be gurantedd to be as follows.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_OJLCBDmkVuk/S0L7H4rvAeI/AAAAAAAAAO0/jbINc9rq8No/s1600-h/result2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/S0L7H4rvAeI/AAAAAAAAAO0/jbINc9rq8No/s320/result2.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Method (2)    Join thread-A to another third thread , which executes both A, B threads.    Here, Demo class starts A and B threads. Which means main thrad of Demo class.    So first start the Thread A.    Then join main thread or the current into thread thread A.    Start Thread B.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;class Demo{&lt;br /&gt;    public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;        A a=new A();&lt;br /&gt;        a.start();&lt;br /&gt;&lt;br /&gt;        try{&lt;br /&gt;            a.join();// Joins the main thread of class Demo which is the current thread into Thread A.&lt;br /&gt;                       //The rest of the code below this point will continue after terminating the Thread A.&lt;br /&gt;        }catch(InterruptedException e){&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;        System.out.println(a.isAlive());//Thread A is terminated and returns false here&lt;br /&gt;&lt;br /&gt;        B b=new B();&lt;br /&gt;&lt;br /&gt;        b.start();&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class A extends Thread{&lt;br /&gt;    public void run(){&lt;br /&gt;&lt;br /&gt;        System.out.println("Thread A started");&lt;br /&gt;        System.out.println("Thread A running");&lt;br /&gt;        System.out.println("Thread A ending");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class B extends Thread{&lt;br /&gt;    public void run() {&lt;br /&gt;&lt;br /&gt;        System.out.println("Thread B started");&lt;br /&gt;        System.out.println("Thread B running");&lt;br /&gt;        System.out.println("Thread B ending");&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Result can be gurantedd to be as follows,.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OJLCBDmkVuk/S0L7V48yGXI/AAAAAAAAAO8/E04T7Y8v1M0/s1600-h/result+3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OJLCBDmkVuk/S0L7V48yGXI/AAAAAAAAAO8/E04T7Y8v1M0/s320/result+3.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;One important thing to know is that when we call,&lt;br /&gt;&lt;div style="color: magenta;"&gt;a.join();&lt;/div&gt;The &lt;span style="color: magenta;"&gt;current executing thread&lt;/span&gt; is joined onto the &lt;span style="color: magenta;"&gt;end &lt;/span&gt;of the the &lt;span style="color: magenta;"&gt;thread represented by 'a'&lt;/span&gt;.So the rest of the code beyond this point will execute only&lt;span style="color: magenta;"&gt; after 'a' is teminated&lt;/span&gt; (Finished executing its run method).&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-6942369314229166861?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/6942369314229166861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=6942369314229166861' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6942369314229166861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6942369314229166861'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2010/01/thread-join-method.html' title='Thread join() method'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_OJLCBDmkVuk/S0L9xP4BKWI/AAAAAAAAAPE/QKHOx1dy7bw/s72-c/result.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-6118587893339951558</id><published>2009-12-25T20:46:00.000+05:30</published><updated>2009-12-25T20:46:10.646+05:30</updated><title type='text'>Dialog internet wasted my holiday!</title><content type='html'>&lt;div style="text-align: justify;"&gt;I'm Using Dialog Huwaei E220 modem for internet access. Today(25/12/2009) @ &lt;span style="color: red;"&gt;10.30A.M&lt;/span&gt;( around) my connection was interrupted. Then I tried to reestablish it( connect again). But always I got the following error message as Error 620&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OJLCBDmkVuk/SzTFf5onFBI/AAAAAAAAAOc/HH1wrGjOnCE/s1600-h/Untitled.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OJLCBDmkVuk/SzTFf5onFBI/AAAAAAAAAOc/HH1wrGjOnCE/s320/Untitled.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;I tried more than 30 times, but every time I got the same error. But I was able to send SMS through the modem.&amp;nbsp;&amp;nbsp; :) &lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;Then I connected to internet using my mobile. After that I did contact Dialog Internet Customer Care Service (CHAT). Time was around 6.20 PM.I told them about this issue. They confirmed as my connection is OK. Further they asked&amp;nbsp; about APN and other things on my dialog connection. I replied them as my APN is&lt;b&gt; www.dialogsl.com&lt;/b&gt; and access number is &lt;b&gt;*99***1#&lt;/b&gt;. Again they confirmed that my connection need to be worked fine. I was hopeless.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;After that I again tried to dial my Huwaei E220, but still I got the same error message. Then I called Dialog Internet Care Service-Technical(Call)- 0777676576. &lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;(Now the time is aroung&lt;span style="color: red;"&gt; 6.55PM&lt;/span&gt;) After waiting about 10 minutes one technical officer called and I told him about&amp;nbsp; my connection issue. He asked what is the APN which I am currently using, I replied &lt;b&gt;www.dialogsl.com&lt;/b&gt;. After that he instructed me to change the APN to &lt;b&gt;&lt;span style="color: red;"&gt;dialogbb&lt;/span&gt;&lt;/b&gt; and reconnect . It did work!&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;My Question is,&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;Why are these people does not inform their customers by sending SMS, before or after doing this kind of changes?&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Better to change your new access point in to &lt;b style="color: red;"&gt;dialogbb&lt;/b&gt;&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-6118587893339951558?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/6118587893339951558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=6118587893339951558' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6118587893339951558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6118587893339951558'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2009/12/dialog-internet-wasted-my-holiday.html' title='Dialog internet wasted my holiday!'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OJLCBDmkVuk/SzTFf5onFBI/AAAAAAAAAOc/HH1wrGjOnCE/s72-c/Untitled.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4681002935995746382</id><published>2009-07-19T19:04:00.003+05:30</published><updated>2009-07-22T16:07:35.941+05:30</updated><title type='text'>Cron Job (Job scheduler) for Web Application</title><content type='html'>This Cron job(Timer Task, Job scheduler) Start when web application deploying and run according to give time schedule.  For adjust the time want to edit time rage of class.&lt;br /&gt;&lt;br /&gt;1. Add following 2 java class in to web application and adjust time with request time period.&lt;br /&gt;2. Add Listener class property in to web.xml&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Web XML entry&lt;/span&gt;&lt;br /&gt;     &lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_OJLCBDmkVuk/Smbryt6sG8I/AAAAAAAAANI/FEfl4LkQQeo/s1600-h/untitled111.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 548px; height: 59px;" src="http://3.bp.blogspot.com/_OJLCBDmkVuk/Smbryt6sG8I/AAAAAAAAANI/FEfl4LkQQeo/s400/untitled111.JPG" alt="" id="BLOGGER_PHOTO_ID_5361231662982896578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Listener class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* To change this template, choose Tools | Templates&lt;br /&gt;* and open the template in the editor.&lt;br /&gt;*/&lt;br /&gt;package com.itfac.chandana;&lt;br /&gt;&lt;br /&gt;import javax.servlet.ServletContext;&lt;br /&gt;import javax.servlet.ServletContextEvent;&lt;br /&gt;import javax.servlet.ServletContextListener;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author Chandana&lt;br /&gt;*/&lt;br /&gt;public class WisdomListener implements ServletContextListener {&lt;br /&gt;&lt;br /&gt; private ServletContext context = null;&lt;br /&gt;&lt;br /&gt; public void contextDestroyed(ServletContextEvent event) {&lt;br /&gt; &lt;br /&gt;     System.out.println("Application is undeploying");&lt;br /&gt;     this.context = null;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public void contextInitialized(ServletContextEvent event) {&lt;br /&gt;     this.context = event.getServletContext();&lt;br /&gt;     TimerTaskScheduler taskShe = new TimerTaskScheduler();&lt;br /&gt;     taskShe.test();&lt;br /&gt;     System.out.println("Application is deploying");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;TimerTaskScheduler&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* To change this template, choose Tools | Templates&lt;br /&gt;* and open the template in the editor.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;package com.itfac.chandana;&lt;br /&gt;&lt;br /&gt;import java.util.Calendar;&lt;br /&gt;import java.util.Timer;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author Chandana&lt;br /&gt;*/&lt;br /&gt;public class TimerTaskScheduler {&lt;br /&gt;&lt;br /&gt; public void test() {&lt;br /&gt;     Timer timer = new Timer();&lt;br /&gt;     Calendar date = Calendar.getInstance();&lt;br /&gt;     date.set(Calendar.HOUR, 0);&lt;br /&gt;     date.set(Calendar.MINUTE, 0);&lt;br /&gt;     date.set(Calendar.SECOND, 2);&lt;br /&gt;     date.set(Calendar.MILLISECOND, 0);&lt;br /&gt;     // Schedule to run every Sunday in midnight&lt;br /&gt;     timer.schedule(new JobRunner(), date.getTime(), 1000*60*60*24);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JobRunner&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* To change this template, choose Tools | Templates&lt;br /&gt;* and open the template in the editor.&lt;br /&gt;*/&lt;br /&gt;package com.itfac.chandana;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.Calendar;&lt;br /&gt;import java.util.Date;&lt;br /&gt;import java.text.*;&lt;br /&gt;import java.sql.*;&lt;br /&gt;import java.util.Timer;&lt;br /&gt;import java.util.TimerTask;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author Chandana&lt;br /&gt;*/&lt;br /&gt;class JobRunner extends TimerTask {&lt;br /&gt;&lt;br /&gt; public JobRunner() {&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @Override&lt;br /&gt; public void run() {&lt;br /&gt;     System.out.println("Generating ");&lt;br /&gt;     /**&lt;br /&gt;     *Your Cron jobs code want to pply here.&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4681002935995746382?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4681002935995746382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4681002935995746382' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4681002935995746382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4681002935995746382'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2009/07/cron-job-job-scheduler-for-web.html' title='Cron Job (Job scheduler) for Web Application'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_OJLCBDmkVuk/Smbryt6sG8I/AAAAAAAAANI/FEfl4LkQQeo/s72-c/untitled111.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-6669781961658417646</id><published>2009-06-19T20:21:00.003+05:30</published><updated>2009-06-19T20:30:12.926+05:30</updated><title type='text'>Multiple versions of IE on one machine</title><content type='html'>&lt;span style="font-weight: bold;"&gt;WAY 1&lt;/span&gt;&lt;br /&gt;I mentioned that  you can indeed install &lt;em&gt;multiple&lt;/em&gt; versions of &lt;em&gt;IE&lt;/em&gt; on &lt;em&gt;one machine&lt;/em&gt;. Microsoft has recently made Virtual PC 2004 a free download; we’ve taken advantage of that by releasing a VPC virtual machine image containing a &lt;b&gt;Windows XP SP2, IE6 or IE7 or IE 8 &lt;/b&gt;this will  help facilitate your testing and development.&lt;br /&gt;&lt;br /&gt;  &lt;a href="http://www.microsoft.com/windows/virtualpc/evaluation/overview2004.mspx" mce_href="http://www.microsoft.com/windows/virtualpc/evaluation/overview2004.mspx"&gt;Get more information on Virtual PC 2004&lt;/a&gt;&lt;br /&gt;  &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&amp;amp;displaylang=en"&gt;Download Virtual PC 2004&lt;/a&gt;&lt;br /&gt;  &lt;a href="http://go.microsoft.com/fwlink/?LinkId=70868" mce_href="http://go.microsoft.com/fwlink/?LinkId=70868"&gt;Download the Internet Explorer ALL Testing VPC Image&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;WAY 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; Tredosoft provides an installer that does everything you need to get that for IE3 IE4.01 IE5 IE5.5 and IE6. They also provide a standalone installer for IE 7.&lt;br /&gt;&lt;br /&gt;  &lt;a href="http://tredosoft.com/Multiple_IE"&gt;Link&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First way I tested and It was very helpful for my web development works.&lt;br /&gt;&lt;p&gt;  &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-6669781961658417646?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/6669781961658417646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=6669781961658417646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6669781961658417646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/6669781961658417646'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2009/06/multiple-versions-of-ie-on-one-machine.html' title='Multiple versions of IE on one machine'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-686838026360303500</id><published>2008-12-16T09:11:00.006+05:30</published><updated>2009-01-28T19:14:07.971+05:30</updated><title type='text'>My Library</title><content type='html'>&lt;embed src="http://www.yudu.com/swf/libraryEmbed.swf" name="Library" flashvars="fvLibId=9751&amp;amp;fvWidth=3&amp;amp;fvHeight=1&amp;amp;fvTags=&amp;amp;fvRefId=9751" quality="high" bgcolor="#333333" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="262" width="388"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-686838026360303500?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/686838026360303500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=686838026360303500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/686838026360303500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/686838026360303500'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/12/my-library_16.html' title='My Library'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-8534816677546781728</id><published>2008-12-07T06:43:00.008+05:30</published><updated>2011-11-11T22:02:24.096+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Huawei E220'/><title type='text'>Unlock Dialog Huawei E220 HSDPA Modem</title><content type='html'>&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;New Post: &lt;a href="http://cnapagoda.blogspot.com/2010/08/how-to-unlock-any-huawei-modem.html"&gt;How to Unlock Any Huawei Modem&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is simple method to unlock dialog HSDPA modem. then you can use it on Mobitel network also. Because it is very easy to access Internet through Pre-Paid connection.&lt;br /&gt;&lt;br /&gt;More Info about &lt;a href="http://www.mobitel.lk/prepaid/3g_delight.html"&gt;Mobitel 3G Daily Delight&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Install following firmware and update your Mobile partner software . Then your Mobile Partner software change as Mobile Connect.&lt;br /&gt;Firmware &lt;a href="http://www.huawei.com/mobileweb/en/file/download.do?f=20497&amp;amp;ctype=1"&gt;Download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After that create New Connection&lt;br /&gt;Settings --&amp;gt; Network connection Settings --&amp;gt; New&lt;br /&gt;&lt;br /&gt;Number           :   *99***1#&lt;br /&gt;APN and Additional Settings  --&amp;gt;  APN    :  www.dialogsl.com&lt;br /&gt;**************************************************************************&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Unlock Document : &lt;/span&gt;&lt;a href="http://cnapagoda.googlepages.com/UnlockHuaweiHSDPAE220Modem.pdf" style="font-weight: bold;"&gt;PDF&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Software : &lt;/span&gt;&lt;a href="http://www.huawei.com/mobileweb/en/doc/list.do?type=-1&amp;amp;id=736" style="font-weight: bold;"&gt;Huawei Patch&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; , &lt;/span&gt;&lt;a href="http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm" style="font-weight: bold;"&gt;Hex Editor&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; , &lt;/span&gt;&lt;a href="http://revskills.de/pages/download.html" style="font-weight: bold;"&gt;QC Mobile Analysis Tool&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; , &lt;/span&gt;&lt;a href="http://www.sfrentreprises.fr/elements/documents/espace-utilisateur/global_access/Huawei_E220.zip" style="font-weight: bold;"&gt;E220 Unlocker&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="https://apis.google.com/js/plusone.js" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;help my site stand out : &lt;g:plusone&gt;&lt;/g:plusone&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cnapagoda.blogspot.com/p/about-me.html" rel="author"&gt; &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-8534816677546781728?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/8534816677546781728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=8534816677546781728' title='33 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8534816677546781728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8534816677546781728'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/12/unlock-dialog-huawei-e220-hsdpa-modem.html' title='Unlock Dialog Huawei E220 HSDPA Modem'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>33</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-8364142925829961053</id><published>2008-10-10T18:11:00.003+05:30</published><updated>2008-10-12T08:06:34.706+05:30</updated><title type='text'>Huawei E220 modem on Ubuntu with Dialog HSDPA</title><content type='html'>&lt;code&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:georgia;"&gt;&lt;span style="font-size:100%;"&gt;Type following command in terminal&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;         $ sudo wvdialconf /etc/wvdial.conf&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;         $ sudo gedit /etc/wvdial.conf&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;uncomment the ‘&lt;strong style="FONT-WEIGHT: normal"&gt;Phone&lt;/strong&gt;‘ field and give the phone number as &lt;strong&gt;*99***1#&lt;/strong&gt; and save the file.&lt;br /&gt;&lt;br /&gt;   *Esc ---&gt; shift qw and Enter for save in vim edit (&lt;span style="font-family:courier new;"&gt;$ sudo vim /etc/wvdial.conf&lt;/span&gt; )&lt;br /&gt;&lt;br /&gt;install the following files and add the huawei driver. &lt;a href="http://cnapagoda.googlepages.com/huawei.tar.bz2"&gt;Drivers &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="font-family:courier new;"&gt;$ tar xjvf huawei.tar.bz2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   $ cd huawei&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   $ su&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   $ make info&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   continue installation  acoding to info file..&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Install conection software using following .deb file &lt;a href="http://cnapagoda.googlepages.com/salutis-connect_1.2.8_all.deb"&gt;Software&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;If you want to monitor network usage following package... &lt;a href="http://cnapagoda.googlepages.com/he220stat.tar.bz2"&gt;Package &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;      more info: &lt;a href="http://oozie.fm.interia.pl/pro/huawei-e220/"&gt;Visit&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-8364142925829961053?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/8364142925829961053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=8364142925829961053' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8364142925829961053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8364142925829961053'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/10/huawei-e220-modem-on-ubuntu.html' title='Huawei E220 modem on Ubuntu with Dialog HSDPA'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4576823736365619836</id><published>2008-10-08T12:15:00.003+05:30</published><updated>2011-09-11T06:57:20.996+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java Location API</title><content type='html'>Here is Example Java Location API example.  But work for this want to support  Java Location API in UR mobile and inbuilt GPS receiver(I only test with mobile emulator).&lt;br /&gt;&lt;br /&gt;what is Location API:&lt;br /&gt;&lt;br /&gt;The Java Location API for J2ME is intended to run on small client devices such as mobile phones.The Location API object model consists of 11 classes and two listener interfaces (&lt;i&gt;LocationListener&lt;/i&gt; and &lt;i&gt;ProximityListener&lt;/i&gt;), all in the javax.microedition.location package. Their design approach uses several standard patterns—Facade, Factory Method, Singleton, and Value Object, and standard JavaBeans-style accessors. Of the 11 classes, two are &lt;i&gt;Exception&lt;/i&gt; classes (&lt;i&gt;LocationException&lt;/i&gt; and &lt;i&gt;LandmarkException&lt;/i&gt;) and another four (&lt;i&gt;AddressInfo&lt;/i&gt;, &lt;i&gt;Criteria&lt;/i&gt;, &lt;i&gt;Orientation&lt;/i&gt;, and &lt;i&gt;QualifiedCoordinates&lt;/i&gt;) are primarily value objects. Many of the properties of these objects may in practice be unavailable, depending on the location-finding technology implementing the API. Still, these properties anticipate likely future developments in mobile networks and devices and the level of location and context detail that they provide.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example Code:&lt;/span&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;package com.test.location;&lt;br /&gt;&lt;br /&gt;import javax.microedition.midlet.*;&lt;br /&gt;import javax.microedition.lcdui.*;&lt;br /&gt;import javax.microedition.location.*;&lt;br /&gt;&lt;br /&gt;public class LocTest extends MIDlet implements CommandListener {&lt;br /&gt;&lt;br /&gt;private Display display;&lt;br /&gt;private Form form;&lt;br /&gt;private Command cmdExit,  cmdOK;&lt;br /&gt;private StringItem si;&lt;br /&gt;&lt;br /&gt;public LocTest() {&lt;br /&gt;display = Display.getDisplay(this);&lt;br /&gt;form = new Form("Location Api test");&lt;br /&gt;cmdExit = new Command("Exit", Command.EXIT, 5);&lt;br /&gt;cmdOK = new Command("OK", Command.OK, 1);&lt;br /&gt;si = new StringItem("Geo Location", "Click OK");&lt;br /&gt;form.append(si);&lt;br /&gt;form.addCommand(cmdOK);&lt;br /&gt;form.addCommand(cmdExit);&lt;br /&gt;form.setCommandListener(this);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void startApp() {&lt;br /&gt;display.setCurrent(form);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void pauseApp() {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void destroyApp(boolean flag) {&lt;br /&gt;notifyDestroyed();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void commandAction(Command c, Displayable d) {&lt;br /&gt;if (c == cmdOK) {&lt;br /&gt;Retriever ret = new Retriever(this);&lt;br /&gt;ret.start();&lt;br /&gt;} else if (c == cmdExit) {&lt;br /&gt;destroyApp(false);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void displayString(String string) {&lt;br /&gt;si.setText(string);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Retriever extends Thread {&lt;br /&gt;&lt;br /&gt;private LocTest midlet;&lt;br /&gt;&lt;br /&gt;public Retriever(LocTest midlet) {&lt;br /&gt;this.midlet = midlet;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void run() {&lt;br /&gt;try {&lt;br /&gt;checkLocation();&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;ex.printStackTrace();&lt;br /&gt;midlet.displayString(ex.toString());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void checkLocation() throws Exception {&lt;br /&gt;String string;&lt;br /&gt;Location l;&lt;br /&gt;LocationProvider lp;&lt;br /&gt;Coordinates c;&lt;br /&gt;&lt;br /&gt;Criteria cr = new Criteria();&lt;br /&gt;cr.setHorizontalAccuracy(500);&lt;br /&gt;&lt;br /&gt;lp = LocationProvider.getInstance(cr);&lt;br /&gt;l = lp.getLocation(60);&lt;br /&gt;&lt;br /&gt;c = l.getQualifiedCoordinates();&lt;br /&gt;if (c != null) {&lt;br /&gt;// Use coordinate information&lt;br /&gt;double lat = c.getLatitude();&lt;br /&gt;double lon = c.getLongitude();&lt;br /&gt;string = "\nLatitude : " + lat + "\nLongitude : " + lon+ "\nSpeed(km/h): " + (l.getSpeed() *3.59999);&lt;br /&gt;} else {&lt;br /&gt;string = "Location API failed";&lt;br /&gt;}&lt;br /&gt;midlet.displayString(string);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4576823736365619836?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4576823736365619836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4576823736365619836' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4576823736365619836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4576823736365619836'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/01/java-location-api.html' title='Java Location API'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-5299172854964482209</id><published>2008-10-01T22:26:00.001+05:30</published><updated>2008-10-01T22:32:58.401+05:30</updated><title type='text'>Java interview ask question</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Question: Why Java does not support multiple inheritence ? &lt;/span&gt;&lt;br /&gt;Answer: Java DOES support multiple inheritance via interface implementation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question:What is the difference between final, finally and finalize?&lt;/span&gt;&lt;br /&gt;Answer: o final - declare constant&lt;br /&gt;              o finally - handles exception&lt;br /&gt;              o finalize - helps in garbage collection&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: Where and how can you use a private constructor.&lt;/span&gt;&lt;br /&gt;Answer: Private constructor can be used if you do not want any other class to instanstiate the object , the instantiation is done from a static public method, this method is used when dealing with the factory method pattern when the designer wants only one controller (fatory method ) to create the object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: In System.out.println(),what is System,out and println,pls explain? &lt;/span&gt;&lt;br /&gt;Answer: System is a predefined final class,out is a PrintStream object and println is a built-in overloaded method in the out object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: What is meant by "Abstract Interface"? &lt;/span&gt;&lt;br /&gt;Answer: First, an interface is abstract. That means you cannot have any implementation in an interface. All the methods declared in an interface are abstract methods or signatures of the methods.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: Can you make an instance of an abstract class? For example - java.util.Calender is an abstract class with a method getInstance() which returns an instance of the Calender class. &lt;/span&gt;&lt;br /&gt;Answer: No! You cannot make an instance of an abstract class. An abstract class has to be sub-classed. If you have an abstract class and you want to use a method which has been implemented, you may need to subclass that abstract class, instantiate your subclass and then call that method.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;y? b="p*q);" return="" value="" would="" be="" variable="" a="" because="" is="" 1="" and="" less="" than="" y="2;" the="" x=""&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: Why Java does not support pointers?&lt;/span&gt;&lt;br /&gt;&lt;/y?&gt;&lt;/span&gt;&lt;span&gt;&lt;y? b="p*q);" return="" value="" would="" be="" variable="" a="" because="" is="" 1="" and="" less="" than="" y="2;" the="" x=""&gt;Answer: Because pointers are unsafe. Java uses reference types to hide pointers and programmers feel easier to deal with reference types without pointers. This is why Java and C# shine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: Can an inner class declared inside of a method access local variables of this method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: It's possible if these variables are final.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: What's the main difference between a Vector and an ArrayList&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Java Vector class is internally synchronized and ArrayList is not.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: When should the method invokeLater()be used?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: This method is used to ensure that Swing components are updated through the event-dispatching thread.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: How can a subclass call a method or a constructor defined in a superclass?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Use the following syntax: super.myMethod(); To call a constructor of the superclass, just write super(); in the first line of the subclass's constructor.&lt;br /&gt;&lt;br /&gt;For senior-level developers:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: What's the difference between a queue and a stack?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Sometimes. But your class may be a descendent of another class and in this case the interface is your only option.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: What comes to mind when you hear about a young generation in Java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Garbage collection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: What comes to mind when someone mentions a shallow copy in Java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Object cloning.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: If you're overriding the method equals() of an object, which other method you might also consider?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: hashCode()&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or LinkedList?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: ArrayList&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: How would you make a copy of an entire Java object with its state?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Have this class implement Cloneable interface and call its method clone().&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: How can you minimize the need of garbage collection and make the memory use more effective?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: Use object pooling and weak object references.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question: What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it?&lt;/span&gt;&lt;br /&gt;Answer: You do not need to specify any access level, and Java will use a default package access level .&lt;br /&gt;&lt;/y?&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;y? b="p*q);" return="" value="" would="" be="" variable="" a="" because="" is="" 1="" and="" less="" than="" y="2;" the="" x=""&gt;&lt;br /&gt;&lt;/y?&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-5299172854964482209?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/5299172854964482209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=5299172854964482209' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5299172854964482209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/5299172854964482209'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/10/java-interview-ask-question.html' title='Java interview ask question'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-8272942614775107819</id><published>2008-06-08T14:31:00.000+05:30</published><updated>2008-06-11T14:48:31.176+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenSource'/><category scheme='http://www.blogger.com/atom/ns#' term='Sun'/><category scheme='http://www.blogger.com/atom/ns#' term='Free'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Netbeans Support Multi Language</title><content type='html'>&lt;div style="text-align: justify;"&gt;Netbeans, the free, open source, software development environment from Sun Microsystems, has just reached version 6.1 (see the Netbeans 6.1 release notes for detailed info).New for version 6.1 is all-new, completely redesigned support for JavaScript (whether it’s standalone JavaScript, or embedded in other files e.g.  HTML).&lt;br /&gt;&lt;br /&gt;Java user groups and developers have contributed work to make NetBeansTM 6 IDE available in Japanese,  Chinese, Brazilian Portuguese, English and Chinese. The NetBeans Translation Project provides opportunities for members of the community to localize the IDE and documentation.&lt;br /&gt;&lt;br /&gt;We expect nearly netBeans support Sinhalese and Tamil language also.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://platform.netbeans.org/"&gt;&lt;img src="http://www.netbeans.org/images/banners/60/110_empowereddownload2_fade.gif" alt="Created with NetBeans!" border="0" height="32" width="110" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://www.netbeans.org/about/press/4629.html"&gt;Press Release&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-8272942614775107819?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/8272942614775107819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=8272942614775107819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8272942614775107819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/8272942614775107819'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/06/netbeans-support-multi-language.html' title='Netbeans Support Multi Language'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-3353564277784268246</id><published>2008-05-16T09:57:00.003+05:30</published><updated>2008-06-11T14:34:41.266+05:30</updated><title type='text'>Netbeans challenges Other IDE's</title><content type='html'>&lt;div style="text-align: justify; font-family: georgia;"&gt;Netbeans has a simple but powerful GUI designer. Create your application window, drag buttons onto it and then double click them to add code and events. If you’ve used the GUI builder in VBA applications, it looks and works a lot like that. And it is extremely easy to learn while at the same time providing powerful layout helpers.&lt;/div&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-3353564277784268246?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/3353564277784268246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=3353564277784268246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/3353564277784268246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/3353564277784268246'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/05/netbeans-challenges-visual-studio.html' title='Netbeans challenges Other IDE&apos;s'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-961881115342921986</id><published>2008-04-20T11:09:00.000+05:30</published><updated>2008-04-23T11:13:16.431+05:30</updated><title type='text'>Creating a State Diagram</title><content type='html'>&lt;div style="text-align: justify;"&gt;A State diagram is a visual representation of an application's state machines. It shows the life of an object from birth to death. In this type of diagram, you see the behavior specifying the sequence of states that the object goes through in response to events over its lifetime, and you see the object's responses to those events.&lt;br /&gt;&lt;br /&gt;You can use a State diagram when you are working on a real-time process-control application or a subsystem that involves concurrent processing, or when you want to express the behavior of a class over several use cases.&lt;br /&gt;&lt;br /&gt;1. Create a UML Project and add a State diagram&lt;br /&gt;&lt;br /&gt;   1. Choose File New Project.&lt;br /&gt;&lt;br /&gt;   2. In the New Project wizard:&lt;br /&gt;         1. Select Categories UML.&lt;br /&gt;         2. Select Projects Platform-Independent Model.&lt;br /&gt;         3. Click Next.&lt;br /&gt;&lt;br /&gt;   3. In the New Platform-Independent Model panel:&lt;br /&gt;         1. Type a name for the UML project, such as MyUMLProject.&lt;br /&gt;         2. Choose a directory where the project will be stored.&lt;br /&gt;&lt;br /&gt;   4. Click Finish.&lt;br /&gt;&lt;br /&gt;   5. In the opened New Wizard window:&lt;br /&gt;         1. Select State Diagram for the Diagram Type.&lt;br /&gt;         2. Type in a name for the diagram, such as SodaMachineStateDiagram.&lt;br /&gt;         3. Accept the default value for namespace.&lt;br /&gt;         4. Click OK.&lt;br /&gt;&lt;br /&gt;The IDE does the following:&lt;br /&gt;&lt;br /&gt;    * Creates a platform-independent project especially designed to handle UML modeling work.&lt;br /&gt;    * Displays the project icon in the Project window.&lt;br /&gt;    * Generates a State diagram in the project.&lt;br /&gt;    * Displays the State diagram icons under both Project Model and Project Diagrams.&lt;br /&gt;    * Opens and displays the State diagram in the diagram editor.&lt;br /&gt;    * Opens the modeling palette to display the particular icons that are used to build State diagrams.&lt;br /&gt;&lt;br /&gt;Next, we will draw a State diagram for a simple soda-machine application.&lt;br /&gt;2. Identify State elements and add them to the State diagramHEADER&lt;br /&gt;&lt;br /&gt;   1. Add an Initial State: Click the Initial State icon in the palette, then click the upper left corner in the State diagram.&lt;br /&gt;   2. Add a Simple State: Click the Simple State icon in the palette, then click the State diagram to the right of the Initial State.&lt;br /&gt;   3. Right-click to deselect element-creation mode.&lt;br /&gt;   4. Double-click the Simple State and name it: Type Displaying, then press the Enter key.&lt;br /&gt;   5. Add three more Simple States and name them Refunding, Calculating, and Processing.&lt;br /&gt;   6. Add a Final State: Click the Final State icon in the palette, then click at the bottom of the State diagram.&lt;br /&gt;   7. Right-click to deselect element-creation mode.&lt;br /&gt;   8. Right-click and select Labels Final State Name to toggle the name label off. (In this particular example, the Final State does not need a name.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Identify events, and connect states with State Transition&lt;br /&gt;&lt;br /&gt;An event causes an object to transition from one state to another. In a State diagram, an event is represented by an arrow connecting the two states; this is called a State Transition element. As we continue our example, we will create a State Transition between the Initial State and the State we have called Displaying. Then, we will add several other State Transitions.&lt;br /&gt;&lt;br /&gt;   1. Add a State Transition element:&lt;br /&gt;         1. Click the State Transition icon in the palette.&lt;br /&gt;         2. Go to the State diagram and click the Initial State.&lt;br /&gt;         3. Click the Displaying State.&lt;br /&gt;&lt;br /&gt;   2. Add a State Transition element from the Displaying State to itself:&lt;br /&gt;         1. Click the State Transition icon in the palette.&lt;br /&gt;         2. Go to the diagram and click the Displaying State.&lt;br /&gt;         3. Move the mouser pointer up a bit, click the diagram, then move the pointer to the right a bit and click the Displaying State in the diagram.&lt;br /&gt;&lt;br /&gt;   3. Place a Horizontal Join/Merge element just below the Displaying State:&lt;br /&gt;         1. Click the Horizontal Join/Merge icon in the palette.&lt;br /&gt;         2. Click the State diagram below the Displaying State element.&lt;br /&gt;&lt;br /&gt;   4. Add eight more State Transition elements:&lt;br /&gt;          * From the Displaying State to the Horizontal Join/Merge&lt;br /&gt;          * From the Horizontal Join/Merge to the Refunding State&lt;br /&gt;          * From the Horizontal Join/Merge to the Calculating State&lt;br /&gt;          * From the Calculating State to the Processing State&lt;br /&gt;          * From the Calculating State to the Displaying State&lt;br /&gt;          * From the Processing State to the Refunding State&lt;br /&gt;          * From the Refunding State to the Final State&lt;br /&gt;          * From the Processing State to the Final State&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Label State Transition with a name, and with a pre-condition or post-condition&lt;br /&gt;&lt;br /&gt;Now we'll give the State Transition an event name and, where necessary, add a pre- or post-condition.&lt;br /&gt;&lt;br /&gt;   1. Right-click the State Transition (the linking arrow) between the Initial State and the Displaying State.&lt;br /&gt;   2. Choose Label Name, and type Coins Entered.&lt;br /&gt;   3. In the same way, label other State Transitions:&lt;br /&gt;&lt;br /&gt;      Label Name     State Transition&lt;br /&gt;      Coins Entered     Displaying State to Displaying State&lt;br /&gt;      Button Pressed     Displaying State to Horizontal Join/Merge&lt;br /&gt;      Calculating Finished     Calculating State to Displaying State&lt;br /&gt;      Calculating Finished     Calculating State to Processing State&lt;br /&gt;      Soda Ejected     Processing State to Final State&lt;br /&gt;      Soda Ejected     Processing State to Refunding State&lt;br /&gt;      Coins Refunded     Refunding State to Final State&lt;br /&gt;&lt;br /&gt;Some State Transitions are subject to conditions, and these need to be labeled. A condition is shown in square brackets on the State Transition link.&lt;br /&gt;&lt;br /&gt;   1. Right-click the State Transition link between Horizontal Join/Merge and Refunding.&lt;br /&gt;   2. Choose Label Pre Condition, and type button=refund.&lt;br /&gt;   3. Repeat these steps to label pre-conditions on other State Transitions.&lt;br /&gt;&lt;br /&gt;      Pre-Condition     State Transition&lt;br /&gt;      button!=refund     Horizontal Join/Merger to Calculating State&lt;br /&gt;      cost&lt;=coin value     Calculating State to Processing State&lt;br /&gt;      cost&gt;coin value     Calculating State to Displaying State&lt;br /&gt;      cost&lt;coin value     Processing State to Refunding State&lt;br /&gt;      cost=coin value     Processing State to Final State&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-961881115342921986?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/961881115342921986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=961881115342921986' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/961881115342921986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/961881115342921986'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/04/creating-state-diagram.html' title='Creating a State Diagram'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4126289754377970958</id><published>2008-04-13T11:03:00.000+05:30</published><updated>2011-11-11T21:56:02.125+05:30</updated><title type='text'>NetBeans IDE Keyboard Shortcuts</title><content type='html'>&lt;table border="0" cellpadding="0" cellspacing="0" class="vatop" style="height: 828px; width: 681px;"&gt;&lt;tbody&gt;&lt;tr class="grey5"&gt;&lt;td&gt;&lt;div class="datacell"&gt;&lt;br /&gt;&lt;br /&gt;Ctrl-Space&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Code completion&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Esc&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Close code completion&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Shift-Space&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Enter a space without expanding&lt;br /&gt;an abbreviation&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-F1&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Display Javadoc&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Shift-F1&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Search Javadoc&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-Shift-I&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Import class&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-U, G&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Append get to identifier&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-U, S&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Append set to identifier&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-U, I&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Append is to identifier&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Shift-F&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Reformat selection&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-T Shift&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;one tab to the right&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-D&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Shift one tab to the left&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Shift-T&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Comment out with line comments&lt;br /&gt;("//")&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Shift-D&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Remove line comments ("//")&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-W&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Delete current or previous word&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-E&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Remove the current line&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-J, S&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Start recording macro&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-J, E&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Stop macro recording&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-[&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Move insertion point to matching&lt;br /&gt;bracket&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-L&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Word match - forward&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-K&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Word match - back&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-F&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Find&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-H&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Replace&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;F3&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Find next&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Shift-F3&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Find previous&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-F3&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Search for word that insertion&lt;br /&gt;point is on&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-Shift-H&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Turn off search result highlighting&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-Shift-O&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Fast Open class&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-O&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Go to source&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-G&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Go to declaration&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-M&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Select next parameter&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-F2&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Add/remove bookmark&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;F2&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Next bookmark&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-L&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Next in jump list (present file)&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-K&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Previous in jump list (present file)&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-Shift-L&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Next in jump list (all files)&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Alt-Shift-K&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Previous in jump list (all files)&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Shift-J&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Insert internationalized string&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Minus (-)&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Collapse (hide) a block of code&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Plus (+)&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Expand a collapsed block of code&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Shift-Minus (-)&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Collapse all code blocks&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="grey5"&gt;  &lt;td&gt;&lt;div class="datacell"&gt;Ctrl-Shift-Plus (-)&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="datacell"&gt;Expand all code blocks&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://plus.google.com/109561047843486740778?rel=author" rel="me"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4126289754377970958?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4126289754377970958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4126289754377970958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4126289754377970958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4126289754377970958'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/04/netbeans-ide-keyboard-shortcuts.html' title='NetBeans IDE Keyboard Shortcuts'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-7104664099274113735</id><published>2008-04-01T13:04:00.000+05:30</published><updated>2011-11-11T21:56:21.384+05:30</updated><title type='text'>Java 1.5 Language Features</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Generics&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This long-awaited enhancement to the type system allows a type or method to operate on objects of various types while providing compile-time type safety. It adds compile-time type safety to the Collections Framework and eliminates the drudgery of casting.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Enhanced for Loop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This new language construct eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Autoboxing/Unboxing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Typesafe Enums&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This flexible object-oriented enumerated type facility allows you to create enumerated types with arbitrary methods and fields. It provides all the benefits of the Typesafe Enum pattern ("Effective Java," Item 21) without the verbosity and the error-proneness.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Varargs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This facility eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Static Import&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This facility lets you avoid qualifying static members with class names without the shortcomings of the "Constant Interface antipattern."&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Metadata (Annotations)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This language feature lets you avoid writing boilerplate code under many circumstances by enabling tools to generate it from annotations in the source code. This leads to a "declarative" programming style where the programmer says what should be done and tools emit the code to do it. Also it eliminates the need for maintaining "side files" that must be kept up to date with changes in source files. Instead the information can be maintained in the source file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-7104664099274113735?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/7104664099274113735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=7104664099274113735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7104664099274113735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/7104664099274113735'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/04/java-15-language-features.html' title='Java 1.5 Language Features'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-4190437643490064272</id><published>2008-03-20T12:05:00.000+05:30</published><updated>2011-11-11T21:57:01.112+05:30</updated><title type='text'>Fantastic Features In Net Bean IDE</title><content type='html'>I downloaded latest Net Bean  IDE for  my new project  in University.   There i can create GUI very easily.  Yesterday I connect my project folder in to SVN server. Using this latest Net Bean IDE  I can  very easily connect  to SVN server.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-4190437643490064272?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/4190437643490064272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=4190437643490064272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4190437643490064272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/4190437643490064272'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/03/fantastic-features-in-net-bean-ide.html' title='Fantastic Features In Net Bean IDE'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-1699680531246223128</id><published>2008-03-10T12:25:00.009+05:30</published><updated>2011-11-11T21:56:41.382+05:30</updated><title type='text'>Java Bean</title><content type='html'>&lt;div style="text-align: justify;"&gt;JavaBeans are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that the bean can be passed around rather than the individual objects.The specification by Sun Microsystems defines them as "reusable software components that can be manipulated visually in a builder tool".&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;// PersonBean.java&lt;br /&gt;       public class PersonBean implements &lt;br /&gt;           java.io.Serializable {&lt;br /&gt;        private String name;&lt;br /&gt;        private boolean deceased;&lt;br /&gt;        // No-arg constructor (takes no arguments).&lt;br /&gt;        public PersonBean() {&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;       // Property "name" (note capitalization) &lt;br /&gt;             readadble/writable&lt;br /&gt;       public String getName() {&lt;br /&gt;          return this.name;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       public void setName(String name) {&lt;br /&gt;           this.name = name;&lt;br /&gt;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       // Property "deceased"&lt;br /&gt;       // Different syntax for a boolean field &lt;br /&gt;          (is vs. get)&lt;br /&gt;&lt;br /&gt;       public boolean isDeceased() {&lt;br /&gt;           return this.deceased;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       public void setDeceased(boolean deceased) {&lt;br /&gt;         this.deceased = deceased;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;// TestPersonBean.java&lt;br /&gt;&lt;br /&gt;    public class TestPersonBean {&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;&lt;br /&gt;    PersonBean person = new PersonBean();&lt;br /&gt;    person.setName("Bob");&lt;br /&gt;    person.setDeceased(false);&lt;br /&gt;&lt;br /&gt;    // Output: "Bob [alive]"&lt;br /&gt;    System.out.print(person.getName());&lt;br /&gt;    System.out.println(person.isDeceased() &lt;br /&gt;        ? " [deceased]" : " [alive]");&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;pre class="source-java"&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;pre class="source-java"&gt;&lt;/pre&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-weight: bold;"&gt;link:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li style="font-family: georgia;"&gt;&lt;a class="external text" href="http://java.sun.com/products/javabeans/" rel="nofollow" title="http://java.sun.com/products/javabeans/"&gt;Sun's JavaBeans product page&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="external text" href="http://java.sun.com/products/javabeans/learning/tutorial/index.html" rel="nofollow" title="http://java.sun.com/products/javabeans/learning/tutorial/index.html"&gt;Sun's JavaBeans tutorials&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;pre class="source-java"&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-1699680531246223128?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/1699680531246223128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=1699680531246223128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1699680531246223128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/1699680531246223128'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/03/java-bean.html' title='Java Bean'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-3776618546476795120</id><published>2008-03-07T08:09:00.001+05:30</published><updated>2011-11-11T21:57:22.311+05:30</updated><title type='text'>What Is Hibernate</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves Object-Relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions.Hibernate is free as open source software that is distributed under the GNU Lesser General Public License.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hibernate's primary feature is mapping from Java classes to database tables (and from Java data types to SQL data types). Hibernate also provides data query and retrieval facilities. Hibernate generates the SQL calls and relieves the developer from manual result set handling and object conversion, keeping the application portable to all SQL databases, with database portability delivered at very little performance overhead.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;LINK:   &lt;a href="http://www.javafree.org/content/view.jf?idContent=3"&gt;Interview with Gavin King, founder of Hibernate&lt;/a&gt;  &lt;a href="http://www.hibernate.org/"&gt;HIBERNATE&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-3776618546476795120?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/3776618546476795120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=3776618546476795120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/3776618546476795120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/3776618546476795120'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/03/what-is-hibernate.html' title='What Is Hibernate'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-369282454137612259</id><published>2008-03-06T07:57:00.001+05:30</published><updated>2011-11-11T21:57:42.941+05:30</updated><title type='text'>Video Transmit Using JMF</title><content type='html'>&lt;div style="text-align: justify;"&gt;Here is One example for video transmit using JMF:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;import java.awt.*;&lt;br /&gt;import javax.media.*;&lt;br /&gt;import javax.media.protocol.*;&lt;br /&gt;import javax.media.protocol.DataSource;&lt;br /&gt;import javax.media.format.*;&lt;br /&gt;import javax.media.control.TrackControl;&lt;br /&gt;import javax.media.control.QualityControl;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class VideoTransmit {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private MediaLocator locator;&lt;br /&gt;private static MediaLocator ml;&lt;br /&gt;private String ipAddress;&lt;br /&gt;private String port;&lt;br /&gt;private Processor processor = null;&lt;br /&gt;private DataSink  rtptransmitter = null;&lt;br /&gt;private DataSource dataOutput = null;&lt;br /&gt;public static CaptureDeviceInfo di = null;&lt;br /&gt;&lt;br /&gt;public VideoTransmit(MediaLocator locator,&lt;br /&gt;String ipAddress,&lt;br /&gt;String port) {&lt;br /&gt;&lt;br /&gt;this.locator = locator;&lt;br /&gt;this.ipAddress = ipAddress;&lt;br /&gt;this.port = port;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public synchronized String start() {&lt;br /&gt;String result;&lt;br /&gt;result = createProcessor();&lt;br /&gt;if (result != null)&lt;br /&gt;return result;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;result = createTransmitter();&lt;br /&gt;if (result != null) {&lt;br /&gt;processor.close();&lt;br /&gt;processor = null;&lt;br /&gt;return result;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;processor.start();&lt;br /&gt;&lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public void stop() {&lt;br /&gt;synchronized (this) {&lt;br /&gt;if (processor != null) {&lt;br /&gt;processor.stop();&lt;br /&gt;processor.close();&lt;br /&gt;processor = null;&lt;br /&gt;rtptransmitter.close();&lt;br /&gt;rtptransmitter = null;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private String createProcessor() {&lt;br /&gt;if (locator == null)&lt;br /&gt;return "Locator is null";&lt;br /&gt;&lt;br /&gt;DataSource ds;&lt;br /&gt;DataSource clone;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;ds = Manager.createDataSource(locator);&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;return "Couldn't create DataSource";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;processor = Manager.createProcessor(ds);&lt;br /&gt;} catch (NoProcessorException npe) {&lt;br /&gt;return "Couldn't create processor";&lt;br /&gt;} catch (IOException ioe) {&lt;br /&gt;return "IOException creating processor";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;boolean result = waitForState(processor, Processor.Configured);&lt;br /&gt;if (result == false)&lt;br /&gt;return "Couldn't configure processor";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TrackControl [] tracks = processor.getTrackControls();&lt;br /&gt;&lt;br /&gt;if (tracks == null || tracks.length &amp;lt; 1)         return "Couldn't find tracks in processor";      boolean programmed = false;     &lt;br /&gt;for (int i = 0; i &amp;lt; tracks.length; i++) {        &lt;br /&gt;Format format = tracks[i].getFormat();        &lt;br /&gt;if (  tracks[i].isEnabled() &amp;amp;&amp;amp;           format instanceof VideoFormat &amp;amp;&amp;amp;           !programmed) {          Dimension size = ((VideoFormat)format).getSize();&lt;br /&gt;float frameRate = ((VideoFormat)format).getFrameRate();&lt;br /&gt;int w = (size.width % 8 == 0 ? size.width :                 (int)(size.width / 8) * 8);        &lt;br /&gt;int h = (size.height % 8 == 0 ? size.height :                 (int)(size.height / 8) * 8);        &lt;br /&gt;VideoFormat jpegFormat = new VideoFormat(VideoFormat.JPEG_RTP,                              new Dimension(w, h),                              Format.NOT_SPECIFIED,                              Format.byteArray,                              frameRate);&lt;br /&gt;tracks[i].setFormat(jpegFormat);         System.err.println("Video transmitted as:");         System.err.println("  " + jpegFormat);         programmed = true;         } else         tracks[i].setEnabled(false);     }      if (!programmed)         return "Couldn't find video track";&lt;br /&gt;ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);&lt;br /&gt;processor.setContentDescriptor(cd);      result = waitForState(processor, Controller.Realized);     if (result == false)         return "Couldn't realize processor";&lt;br /&gt;setJPEGQuality(processor, 0.5f);     dataOutput = processor.getDataOutput();     return null;     }      private String createTransmitter() {      //    rtp://129.130.131.132:42050/video     String rtpURL = "rtp://" + ipAddress + ":" + port + "/video";     MediaLocator outputLocator = new MediaLocator(rtpURL);       try {         rtptransmitter = Manager.createDataSink(dataOutput, outputLocator);         rtptransmitter.open();&lt;br /&gt;rtptransmitter.start();         dataOutput.start();     } catch (MediaException me) {         return "Couldn't create RTP data sink";     } catch (IOException ioe) {         return "Couldn't create RTP data sink";     }      return null;     }       void setJPEGQuality(Player p, float val) {      Control cs[] = p.getControls();     QualityControl qc = null;     VideoFormat jpegFmt = new VideoFormat(VideoFormat.JPEG);       for (int i = 0; i &amp;lt; owner =" ((Owned)cs[i]).getOwner();" j =" 0;" qc =" (QualityControl)cs[i];" statelock =" new" failed =" false;" failed =" true;" failed =" false;" state ="="" state ="=""&amp;gt; &lt;destip&gt; &lt;destport&gt;");&lt;br /&gt;       System.exit(-1);&lt;br /&gt;   }*/&lt;br /&gt;   ml = args[0];&lt;br /&gt;   String url1 = args[1];&lt;br /&gt;   String port1 = args[2];&lt;br /&gt;   VideoTransmit vt = new VideoTransmit(ml, url1, port1);&lt;br /&gt;&lt;br /&gt;   String result = vt.start();&lt;br /&gt;   if (result != null) {&lt;br /&gt;       System.err.println("Error : " + result);&lt;br /&gt;       System.exit(0);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   System.err.println("Start transmission for 60 seconds...");&lt;br /&gt;&lt;br /&gt;   try {&lt;br /&gt;       Thread.currentThread().sleep(60000);&lt;br /&gt;   } catch (InterruptedException ie) {&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   vt.stop();&lt;br /&gt;&lt;br /&gt;   System.err.println("...transmission ended.");&lt;br /&gt;&lt;br /&gt;   System.exit(0);&lt;br /&gt;   }&lt;br /&gt;}&lt;/destport&gt;&lt;/destip&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Instructin:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;For run:    java  media_location IPaddress  Port&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;JMF download: &lt;/span&gt;&lt;a href="http://java.sun.com/products/java-media/jmf/2.1.1/download.html" style="font-weight: bold;"&gt;SUN&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hardware Requirements&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* 166 MHz Pentium, 160 MHz PowerPC, or 166 MHz UltraSparc&lt;br /&gt;* 32 MB RAM or greater&lt;br /&gt;* Optional: An appropriate sound card for audio play back, if necessary. For example, a SoundBlaster-compatible card for Windows machines without built-in audio support, or an Ultimedia sound card for AIX machines without built-in audio support.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installation Instructions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Download the version of JMF you want to install by selecting a download format and and clicking the continue button.&lt;br /&gt;&lt;br /&gt;The downloaded file is an executable. For Windows, it's an InstallShield executable; for Solaris, it's a self-extracting shell script; otherwise it's a generic zip file.&lt;br /&gt;&lt;br /&gt;2. If you are installing the JMF Performance Pack for Windows&lt;br /&gt;&lt;br /&gt;* Run the executable by double-clicking on the&lt;br /&gt;jmf-2_1_1e-windows-i586.exe&lt;br /&gt;&lt;br /&gt;NOTE: The Windows installation program automatically detects whether or not Netscape Communicator 4.03 or later is installed and then installs JMF for its use! If you are using Netscape Communicator 4.04 or 4.05, then you must install the JDK 1.1 patch for Netscape Communicator before you can run any JMF applets. Netscape Communicator 4.06 or greater already supports JDK 1.1 without the patch.&lt;br /&gt;&lt;br /&gt;If you are installing the JMF Performance Pack for Solaris SPARC&lt;br /&gt;&lt;br /&gt;* Change directories to the install location.&lt;br /&gt;* Run the command % /bin/sh ./jmf-2_1_1e-solaris-sparc.bin&lt;br /&gt;&lt;br /&gt;If you are installing the JMF Performance Pack for Linux&lt;br /&gt;&lt;br /&gt;* Change directories to the install location.&lt;br /&gt;* Run the command % /bin/sh ./jmf-2_1_1e-linux-i586.bin&lt;br /&gt;&lt;br /&gt;If you are installing a zip file&lt;br /&gt;&lt;br /&gt;* Run the appropriate zip command for your system, e.g. winzip or unzip to extract JMF onto your system.&lt;br /&gt;&lt;br /&gt;3. IMPORTANT: You must finish setting up JMF by following the setup instructions included in the JMF Implementation Documentation. You can download the documentation package separately or view it online. -----&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-369282454137612259?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/369282454137612259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=369282454137612259' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/369282454137612259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/369282454137612259'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/03/video-transmit-using-jmf.html' title='Video Transmit Using JMF'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-38266689302835102</id><published>2008-03-03T11:59:00.000+05:30</published><updated>2011-11-11T21:58:06.417+05:30</updated><title type='text'>What Is NetBeans IDE</title><content type='html'>&lt;span style="font-weight: bold;"&gt;History:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;NetBeans began in 1997 as Xelfi, a student project under the guidance of the Faculty of Mathematics and Physics at Charles University in Prague. A company was later formed around the project and produced commercial versions of the NetBeans IDE until it was bought by Sun Microsystems in 1999. Sun open-sourced the NetBeans IDE in June of the following year.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NetBeans 6.0.1&lt;/span&gt;&lt;span style="font-family: arial;"&gt;NetBeans 6 version support for developing IDE modules and rich client application. The New GIU Builder, Subversion Support, JBoss support, CVS support and many more features included.  &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-38266689302835102?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/38266689302835102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=38266689302835102' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/38266689302835102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/38266689302835102'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/03/what-is-netbeans-ide.html' title='What Is NetBeans IDE'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18481069.post-2435654064759470619</id><published>2008-02-26T12:48:00.006+05:30</published><updated>2011-11-11T21:58:30.423+05:30</updated><title type='text'>Set JFreeChart data from database</title><content type='html'>&lt;ol&gt;&lt;li&gt; Create Database and finish the configuration.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Consider this Example: &lt;a href="http://www.java2s.com/Code/Java/Chart/JFreeChartBarChartDemo.htm"&gt;link&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;dataset.addValue(1.0, series1, category1);&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-size: 100%;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;There you set value for the chart.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;span style="font-size: 100%;"&gt;&lt;code&gt;   while(resultset.next()){&lt;br /&gt;      String test = resultset.toString(1);&lt;br /&gt;      dataset.addValue(test, "series1", category1);&lt;br /&gt;   }&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size: 100%;"&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;code&gt;Using database get the result set and devide that result set using while loop like this: &lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;code&gt;&lt;/code&gt;&lt;/ol&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;code&gt;&lt;span style="font-family: times new roman; font-size: 85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #993399;"&gt;   if there any problem regarding that, add ur comment here&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family: times new roman; font-size: 85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18481069-2435654064759470619?l=cnapagoda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cnapagoda.blogspot.com/feeds/2435654064759470619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18481069&amp;postID=2435654064759470619' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/2435654064759470619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18481069/posts/default/2435654064759470619'/><link rel='alternate' type='text/html' href='http://cnapagoda.blogspot.com/2008/02/set-jfreechart-data-from-database.html' title='Set JFreeChart data from database'/><author><name>Chandana Napagoda</name><uri>https://profiles.google.com/109561047843486740778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-xK2tojx4mSk/AAAAAAAAAAI/AAAAAAAAAeU/BjZYlrYwWi0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry></feed>
