<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7917477484425680152</id><updated>2024-08-28T05:11:34.380-07:00</updated><title type='text'>Developers</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nitinroman-javatutorials.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-5962012084284122677</id><published>2009-02-06T05:38:00.001-08:00</published><updated>2009-02-06T05:38:23.038-08:00</updated><title type='text'>J2SE 5.0 Features</title><content type='html'>&lt;br&gt;&lt;b&gt;Features of J2SE 5.0&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Generics &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enhanced for Loop &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Autoboxing/Unboxing &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Typesafe Enums &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Varargs &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Static Import &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Metadata (Annotations) &lt;br&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Generics&lt;/b&gt;&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; When you read an element out of a Collection, you must cast it to the type of element that is stored in the collection. Besides being inconvenient, this is unsafe. The compiler does not check that your cast is the same as the collection&amp;#39;s type, so the cast can fail at run time.&lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Generics provides a way for you to communicate the type of a collection to the compiler, so that it can be checked. Once the compiler knows the element type of the collection, the compiler can check that you have used the collection consistently and can insert the correct casts on values being taken out of the collection. &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;br&gt;&lt;b&gt;Enhanced for Loop&lt;/b&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; It eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays.&lt;br&gt;&lt;br&gt;&lt;b&gt;Autoboxing/Unboxing&lt;/b&gt;&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; It allows you to put/retrieve primitive data types in the collection. e.g. You can&#39;t put an int (or other primitive value) into a collection. &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Collections can only hold object references, so you have to box primitive values into the appropriate wrapper class (which is Integer in the case of int). &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; When you take the object out of the collection, you get the Integer that you put in; if you need an int, you must unbox the Integer using the intValue method. &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; All of this boxing and unboxing is a pain, and clutters up your code. The autoboxing and unboxing feature automates the process, eliminating the pain and the clutter. &lt;br&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; &lt;br&gt;&lt;br&gt;&lt;b&gt;Typesafe Enums&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Enumerated type facility allows you to create enumerated types with arbitrary methods and fields. &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; It provides all the benefits of the Typesafe Enum pattern without the verbosity and the error-proneness. &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;b&gt;Varags&lt;/b&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 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;b&gt;Static Import&lt;/b&gt;&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; The static import construct allows unqualified access to static members without inheriting from the type containing the static members. &lt;br&gt;&lt;br&gt;&lt;b&gt;Metadata (Annotations) &lt;/b&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Metadata language feature lets you avoid writing boilerplate code under many circumstances by enabling tools to generate it from annotations in the source code.&lt;br&gt; </content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/5962012084284122677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/5962012084284122677'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2009/02/j2se-50-features.html' title='J2SE 5.0 Features'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-7101812875999281149</id><published>2009-02-06T05:15:00.000-08:00</published><updated>2009-02-06T05:16:00.347-08:00</updated><title type='text'>Use of Abstract Class and Interface</title><content type='html'>When should I use an interface instead of an abstract class?&lt;br&gt;&lt;br&gt;Use abstract Java classes when you want to provide some standard base code but want/need to force the user&amp;#39;s &lt;br&gt;of your class to complete the implementation &lt;br&gt; &lt;br&gt;(i.e., you create a skeleton implementation and the sub-classes must flesh it out)&lt;br&gt;&lt;br&gt;Interfaces are useful when you do not want classes to inherit from unrelated classes just to get the required functionality. &lt;br&gt; For example, let bird be a class with a method fly(). It will be ridiculous for an aeroplane to inherit from bird class just &lt;br&gt;because it has the fly() method. &lt;br&gt;Rather the fly() method should be defined as an interface and both bird and aeroplane should implement that interface.&lt;br&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt; </content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/7101812875999281149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/7101812875999281149'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2009/02/use-of-abstract-class-and-interface.html' title='Use of Abstract Class and Interface'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-6970953271777960878</id><published>2008-07-01T07:23:00.000-07:00</published><updated>2008-11-13T20:17:57.999-08:00</updated><title type='text'>How to setup HyperTerminal To access device connected to Port?</title><content type='html'>Following Steps will show you how to setup Hyper Terminal to the Serial Port&lt;br /&gt;&lt;br /&gt;  1.     Start --&gt; Programs --&gt; Accessories --&gt; Communiations --&gt; HyperTerminal&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_cEVq6dhbf14/SGo-N3FTruI/AAAAAAAAABY/HMr9PsGtHxE/s1600-h/image1.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;http://3.bp.blogspot.com/_cEVq6dhbf14/SGo-N3FTruI/AAAAAAAAABY/HMr9PsGtHxE/s320/image1.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218051526107573986&quot; border=&quot;0&quot; /&gt;&lt;/a&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;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Give any name so that this will be available for next access. Select Connect using proper port which shown in  BlueSoleil Software.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_cEVq6dhbf14/SGpAx9LrbGI/AAAAAAAAABg/DMiPGN33UrU/s1600-h/image2.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;http://3.bp.blogspot.com/_cEVq6dhbf14/SGpAx9LrbGI/AAAAAAAAABg/DMiPGN33UrU/s320/image2.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218054345243454562&quot; border=&quot;0&quot; /&gt;&lt;/a&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;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.    Select the properties in the the picture. This will configure the communication properties between HyperTerminal and Mobile.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_cEVq6dhbf14/SGpBK9Zc2pI/AAAAAAAAABo/zrsvJBy7l80/s1600-h/image3.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;http://4.bp.blogspot.com/_cEVq6dhbf14/SGpBK9Zc2pI/AAAAAAAAABo/zrsvJBy7l80/s320/image3.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218054774797949586&quot; border=&quot;0&quot; /&gt;&lt;/a&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;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4.    Type AT command in the Window, you will see the  response as follows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_cEVq6dhbf14/SGpBXpsahAI/AAAAAAAAABw/KGtMXUzcHTs/s1600-h/image4.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;http://1.bp.blogspot.com/_cEVq6dhbf14/SGpBXpsahAI/AAAAAAAAABw/KGtMXUzcHTs/s320/image4.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218054992847078402&quot; border=&quot;0&quot; /&gt;&lt;/a&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;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.     You will get a complete list of AT-Commands  to test various options of mobile using AT-Commands.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/6970953271777960878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/6970953271777960878'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2008/07/how-to-setup-hyperterminal-to-access.html' title='How to setup HyperTerminal To access device connected to Port?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_cEVq6dhbf14/SGo-N3FTruI/AAAAAAAAABY/HMr9PsGtHxE/s72-c/image1.JPG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-4593567872543063371</id><published>2008-06-29T07:28:00.000-07:00</published><updated>2008-06-29T07:29:09.890-07:00</updated><title type='text'>How to install Java Communication Package on windows?</title><content type='html'>You can download Communication Package from following URL. This is a old package of Communication API.&lt;br /&gt;&lt;br /&gt;http://people.inf.ethz.ch/hvogt/proj/pp/files/win/javacomm20-win32.zip&lt;br /&gt;&lt;br /&gt;1. Unzip the file javacomm20-win32.zip to javacomm20-win32 directory.&lt;br /&gt;2. Copy win32com.dll to your &lt;jdk&gt;\bin directory.&lt;br /&gt;3. Copy comm.jar to your &lt;jdk&gt;\jre\lib\ext\ directory.&lt;br /&gt;4. Copy javax.comm.properties to your &lt;jdk&gt;\jre\lib directory.&lt;br /&gt;&lt;br /&gt;You can check this installation with the Samples provided in the Java Communication Package.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/4593567872543063371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/4593567872543063371'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2008/06/how-to-install-java-communication.html' title='How to install Java Communication Package on windows?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-3625305213226093522</id><published>2007-12-19T04:59:00.001-08:00</published><updated>2007-12-19T04:59:56.739-08:00</updated><title type='text'>How to install GlashFish Server on linux?</title><content type='html'>&lt;div style=&quot;text-align: center; font-family: verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;Installing GlassFish Server on Linux&lt;/span&gt;&lt;/b&gt;&lt;br&gt;&lt;/div&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt; 1)&amp;nbsp;&amp;nbsp;&amp;nbsp; Install JDK on a system and set JAVA_HOME environmental variable.&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you don&amp;#39;t have GlassFish server, U can download GlassFish Server from following location.&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; &lt;a href=&quot;http://java.net/download/javaee5/v2_branch/promoted/Linux/glassfish-installer-v2-b58g.jar&quot;&gt;http://java.net/download/javaee5/v2_branch/promoted/Linux/glassfish-installer-v2-b58g.jar &lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp; Run:&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt; java -Xmx256m -jar filename.jar&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; This will extract jar file and create a new directory structure rooted under a directory named &amp;#39;glassfish&amp;#39;.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;3)&amp;nbsp;&amp;nbsp;&amp;nbsp; cd glassfish&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Change Directory to GlassFish.&lt;br&gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt; 4)&amp;nbsp;&amp;nbsp;&amp;nbsp; If you are using a machine with an operating system that is a derivative of UNIX(tm), set the execute permission for the Ant binaries that are included with the GlassFish bundle.&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;chmod -R +x lib/ant/bin&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt; &lt;span style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lib/ant/bin/ant -f  setup.xml &lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR for Windows:&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b style=&quot;color: rgb(0, 0, 153);&quot;&gt;lib\ant\bin\ant -f setup.xml &lt;/b&gt;&lt;br&gt;&lt;br&gt;5)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start the server using the asadmin command. For that be maybe you first have to change the current directory to /glassfish/bin. &lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;br&gt;6) &amp;nbsp;&amp;nbsp; next start the database&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;asadmin&amp;gt; start-database&lt;/span&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;7)&amp;nbsp;&amp;nbsp; and finally you can start the server...&lt;/span&gt;&lt;pre style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;font size=&quot;2&quot;&gt;     &lt;b&gt; &lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt; asadmin&amp;gt; start-domain domain1&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: verdana,sans-serif;&quot;&gt;      You can access your default page at&lt;br&gt;&lt;b&gt;&lt;br&gt;       &lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;a href=&quot;http://localhost:8080/&quot;&gt; http://localhost:8080/&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;8)   The server is now up and running. You can log into the web admin interface by the following url:&lt;br&gt;&lt;br&gt;      &lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;a href=&quot;http://localhost:4848&quot;&gt; http://localhost:4848&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;     &lt;b style=&quot;color: rgb(0, 0, 153);&quot;&gt; Login as Admin - userid=&amp;quot;admin&amp;quot;, password =&amp;quot;adminadmin&amp;quot;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; </content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/3625305213226093522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/3625305213226093522'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2007/12/how-to-install-glashfish-server-on.html' title='How to install GlashFish Server on linux?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-1563595143911571067</id><published>2007-12-14T20:27:00.001-08:00</published><updated>2007-12-14T20:27:02.849-08:00</updated><title type='text'>Enable Directory Listings in Tomcat</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt;Enable Directory Listings in Tomcat&lt;/span&gt;&lt;/b&gt;&lt;br&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;br&gt;We can enable &lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;Directory listings&lt;/span&gt;&lt;/b&gt; for applications when welcome files are mentioned.&lt;br&gt;&lt;br&gt;For that we have to use  &lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;web.xml&lt;/span&gt;&lt;/b&gt; in &lt;b style=&quot;color: rgb(0, 0, 153);&quot;&gt;conf &lt;/b&gt;folder. The lines which are make bold with blue color do the tricks. &lt;br&gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-name&amp;gt;default&amp;lt;/servlet-name&amp;gt; &lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-class&amp;gt;org.apache.catalina.servlets.DefaultServlet&amp;lt;/servlet-class&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;init-param&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-name&amp;gt;debug&amp;lt;/param-name&amp;gt; &lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-value&amp;gt;0&amp;lt;/param-value&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/init-param&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;init-param&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-name&amp;gt;listings&amp;lt;/param-name&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-value&amp;gt;true&amp;lt;/param-value&amp;gt; &lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif; color: rgb(0, 0, 153);&quot;&gt;&lt;/b&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/init-param&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/servlet&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; &lt;br&gt;&lt;br&gt; </content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/1563595143911571067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/1563595143911571067'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2007/12/enable-directory-listings-in-tomcat.html' title='Enable Directory Listings in Tomcat'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-3084533815004350559</id><published>2007-12-14T11:48:00.001-08:00</published><updated>2007-12-14T11:48:55.795-08:00</updated><title type='text'>Virtual Hosting in Tomcat</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;color: rgb(0, 0, 153);&quot;&gt;Virtual Hosting in Tomcat&lt;br&gt;&lt;br&gt;&lt;/b&gt;&lt;div style=&quot;text-align: left;&quot;&gt;We can configure Virtual Hosting in Tomcat by simply adding Hosts in the server.xml file of Tomcat. &lt;br&gt;&lt;br&gt;Here is the entry in the server.xml that configures Hosts in the Tomat.&lt;br&gt;&lt;br&gt;&lt;div style=&quot;text-align: left; margin-left: 40px;&quot;&gt;&amp;nbsp;&amp;lt;Host name=&amp;quot;&lt;a href=&quot;http://www.nitinroman.com&quot;&gt;www.nitinroman.com&lt;/a&gt;&amp;quot; appBase=&amp;quot;webapps&amp;quot; unpackWARs=&amp;quot;true&amp;quot; autoDeploy=&amp;quot;true&amp;quot; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlValidation=&amp;quot;false&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Host&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Host name=&amp;quot;&lt;a href=&quot;http://www.sachinroman.com&quot;&gt;www.sachinroman.com&lt;/a&gt;&amp;quot; appBase=&amp;quot;webapps&amp;quot; unpackWARs=&amp;quot;true&amp;quot; autoDeploy=&amp;quot;true&amp;quot; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlValidation=&amp;quot;false&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Host&amp;gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;After making an entry in the server.xml , restart&amp;nbsp; the Tomcat.&lt;br&gt;&lt;br&gt; Finally add an entry in C:\WINDOWS\system32\drivers\etc\hosts file as follows&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://127.0.0.1&quot;&gt;127.0.0.1&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; localhost&lt;br&gt;&lt;a href=&quot;http://127.0.0.1&quot;&gt;127.0.0.1&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://www.nitinroman.com&quot;&gt; www.nitinroman.com&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://127.0.0.1&quot;&gt;127.0.0.1&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://www.sachinroman.com&quot;&gt;www.sachinroman.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left; margin-left: 40px;&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; </content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/3084533815004350559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/3084533815004350559'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2007/12/virtual-hosting-in-tomcat.html' title='Virtual Hosting in Tomcat'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7917477484425680152.post-7452316805671907507</id><published>2007-12-14T11:21:00.001-08:00</published><updated>2007-12-14T11:21:14.723-08:00</updated><title type='text'>How to Execute Linux Machine Command using Java from Windows Operating System?</title><content type='html'>&lt;div style=&quot;text-align: left; font-family: verdana,sans-serif;&quot;&gt;Here, In this example, we are execute Linux machine command using Java from windows operating machine.&lt;br&gt;&lt;br&gt;In Java, This can be achieved using Command Prompt. To access any runtime (say DOS) we need an access to that Runtime. We can access runtime using Runtime class. &lt;br&gt;&lt;br&gt;&lt;b style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;Runtime class&lt;/b&gt;&lt;span style=&quot;background-color: rgb(255, 255, 255);&quot;&gt; &lt;/span&gt;has a static method called &lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;getRuntime()&lt;/span&gt; which returns Runtime object. &lt;br&gt;Then with exec() method we can have access to that runtime command.&lt;br&gt;&lt;br&gt;To access Linux machine, we need plink - ( a command-line interface to the PuTTY back ends ) which can be downloaded from the following URL,&lt;br&gt; &lt;br&gt;&lt;a href=&quot;http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html&quot;&gt;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Here, Is the code snippet that will do the work.&lt;br&gt;&lt;br&gt;&lt;br&gt;class RuntimeTest &lt;br&gt;{&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;public static void main(String[] args)&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;{&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;try&lt;br&gt;{&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;Runtime runtime= Runtime.getRuntime ();&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;// Here , we have to access command line to run plink utility as well provide username , password and comman to execute on linux machine.&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 120px;&quot;&gt; Process pro = runtime.exec(&amp;quot;cmd /c plink.exe &lt;a href=&quot;mailto:root@192.168.0.247&quot;&gt;root@192.168.0.247&lt;/a&gt; -pw nki.6300 mkdir test13456&amp;quot;);&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;// Wait for the result of process. &lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 120px;&quot;&gt;int i = pro.waitFor();&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 120px;&quot;&gt;if(i==0)&lt;br&gt;{&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;System.out.println(&amp;quot;Exceuted&amp;quot;);&lt;br&gt;&lt;/div&gt;}&lt;br&gt; &lt;/div&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 80px;&quot;&gt;}&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 80px;&quot;&gt;catch(Exception ex)&lt;br&gt;{&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;System.out.println(ex);&lt;br&gt;&lt;/div&gt;}&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt; }&lt;br&gt;&lt;/div&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;br style=&quot;font-family: verdana,sans-serif;&quot;&gt; </content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/7452316805671907507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7917477484425680152/posts/default/7452316805671907507'/><link rel='alternate' type='text/html' href='http://nitinroman-javatutorials.blogspot.com/2007/12/how-to-execute-linux-machine-command.html' title='How to Execute Linux Machine Command using Java from Windows Operating System?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>