<?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-8066513</id><updated>2012-01-26T20:24:28.395-08:00</updated><category term='t'/><title type='text'>iamjerryyeung</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default?start-index=101&amp;max-results=100'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>207</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8066513.post-9198239710941185084</id><published>2012-01-26T20:21:00.000-08:00</published><updated>2012-01-26T20:24:28.410-08:00</updated><title type='text'>internet to cisco</title><content type='html'>1. mac book connect to ethernet, then VPN&lt;br /&gt;2. turn on air port&lt;br /&gt;3. Use "sharing", check internet sharing with from "ethernet" to "airport"&lt;br /&gt;4. run Charles, change the HTTP Proxy port to 9988&lt;br /&gt;5. on iPad, go to wifi -&amp;gt; linksys -&amp;gt; Proxy, click manual, type in the ip address of air port and port of HTTP proxy defined in charles&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-9198239710941185084?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/9198239710941185084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=9198239710941185084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/9198239710941185084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/9198239710941185084'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2012/01/internet-to-cisco.html' title='internet to cisco'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2488074104060388460</id><published>2011-12-06T22:59:00.000-08:00</published><updated>2011-12-06T23:00:52.359-08:00</updated><title type='text'></title><content type='html'>&lt;a href="http://www.javamex.com/tutorials/memory/instrumentation.shtml"&gt;http://www.javamex.com/tutorials/memory/instrumentation.shtml&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;classmexer to find out the size of an Java object (could be deep) using Instrumentation&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2488074104060388460?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2488074104060388460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2488074104060388460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2488074104060388460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2488074104060388460'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/12/httpwww.html' title=''/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6862031979008168761</id><published>2011-11-13T14:02:00.001-08:00</published><updated>2011-11-13T14:02:19.398-08:00</updated><title type='text'>hibernate insert false</title><content type='html'>http://stackoverflow.com/questions/2468106/hibernate-update-jpa-foreign-key&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-6862031979008168761?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6862031979008168761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6862031979008168761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6862031979008168761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6862031979008168761'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/11/hibernate-insert-false.html' title='hibernate insert false'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-5359166487096285234</id><published>2011-09-28T23:04:00.001-07:00</published><updated>2011-09-28T23:04:33.960-07:00</updated><title type='text'>android phone gap plugin</title><content type='html'>http://wiki.phonegap.com/w/page/36753494/How%20to%20Create%20a%20PhoneGap%20Plugin%20for%20Android&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-5359166487096285234?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/5359166487096285234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=5359166487096285234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5359166487096285234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5359166487096285234'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/09/android-phone-gap-plugin.html' title='android phone gap plugin'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-7037574572377719581</id><published>2011-09-28T22:53:00.001-07:00</published><updated>2011-09-28T22:53:50.545-07:00</updated><title type='text'>android certificate</title><content type='html'>http://www.realmb.com/droidCert/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-7037574572377719581?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/7037574572377719581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=7037574572377719581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7037574572377719581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7037574572377719581'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/09/android-certificate.html' title='android certificate'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-7234943374089155535</id><published>2011-09-19T12:58:00.000-07:00</published><updated>2011-09-19T12:59:57.888-07:00</updated><title type='text'>stock essp sale</title><content type='html'>on 9-19-2011 492 + 365 =857&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;12-2004, 6-2005&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-7234943374089155535?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/7234943374089155535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=7234943374089155535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7234943374089155535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7234943374089155535'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/09/stock-essp-sale.html' title='stock essp sale'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6402502555252334095</id><published>2011-09-12T17:15:00.001-07:00</published><updated>2011-09-12T17:15:31.170-07:00</updated><title type='text'>certificate checking</title><content type='html'>http://jcalcote.wordpress.com/2010/06/22/managing-a-dynamic-java-trust-store/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-6402502555252334095?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6402502555252334095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6402502555252334095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6402502555252334095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6402502555252334095'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/09/certificate-checking.html' title='certificate checking'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6222595831707365594</id><published>2011-09-11T12:16:00.000-07:00</published><updated>2011-09-11T12:25:51.278-07:00</updated><title type='text'>xcodebuild</title><content type='html'>&lt;a href="http://stackoverflow.com/questions/2327257/name-of-provisioning-profile-used-to-sign-an-iphone-app"&gt;http://stackoverflow.com/questions/2327257/name-of-provisioning-profile-used-to-sign-an-iphone-app&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; "&gt;&lt;pre class="default prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;security find&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;identity &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;p codesigning &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;v&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class="default prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;a href="http://stackoverflow.com/questions/866761/setting-a-provisioning-profile-from-within-xcodebuild-when-making-iphone-apps"&gt;http://stackoverflow.com/questions/866761/setting-a-provisioning-profile-from-within-xcodebuild-when-making-iphone-apps&lt;/a&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; "&gt;&lt;pre class="default prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="Apple-style-span" &gt;&lt;a href="http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson"&gt;http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="default prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="com" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial; "&gt;#!/bin/bash&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;&lt;br /&gt;TARGET&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"Your App"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;CONFIGURATION&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"Release"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;SDK&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"iphoneos"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;PROFILE_PATH&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"/Users/jkp/Desktop/foo.mobileprovision"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;IDENTITY&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"iPhone Distribution: Your Company Ltd"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;KEYCHAIN&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"/Users/jkp/Desktop/keychain"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;PASSWORD&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"foobar"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;&lt;br /&gt;open &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"${PROFILE_PATH}"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;sleep &lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;5&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;osascript &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;e &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"tell application \"Xcode\" to quit"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;security unlock&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;keychain &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;p $&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;{&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;PASSWORD&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;}&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; $&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;{&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;KEYCHAIN&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;}&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;xcodebuild &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;target &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"${TARGET}"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;configuration $&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;{&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;CONFIGURATION&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;}&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;-&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;sdk iphoneos CODE_SIGN_IDENTITY&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"${IDENTITY}"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; OTHER_CODE_SIGN_FLAGS&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"--keychain ${KEYCHAIN}"&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-6222595831707365594?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6222595831707365594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6222595831707365594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6222595831707365594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6222595831707365594'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/09/xcodebuild.html' title='xcodebuild'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6449738582272616842</id><published>2011-08-19T16:16:00.001-07:00</published><updated>2011-08-19T16:16:33.797-07:00</updated><title type='text'>mobile web app add to home screen scripthttp://cubiq.org/add-to-home-screen</title><content type='html'>http://cubiq.org/add-to-home-screen&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-6449738582272616842?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6449738582272616842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6449738582272616842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6449738582272616842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6449738582272616842'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/08/mobile-web-app-add-to-home-screen.html' title='mobile web app add to home screen scripthttp://cubiq.org/add-to-home-screen'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2253995640062661893</id><published>2011-08-19T15:21:00.001-07:00</published><updated>2011-08-19T15:21:59.650-07:00</updated><title type='text'>javascript debug</title><content type='html'>http://pmuellr.blogspot.com/2009/09/javascript-tracing.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2253995640062661893?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2253995640062661893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2253995640062661893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2253995640062661893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2253995640062661893'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/08/javascript-debug.html' title='javascript debug'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6499531830934844054</id><published>2011-08-19T15:14:00.000-07:00</published><updated>2011-08-19T15:15:07.230-07:00</updated><title type='text'>debug iphone app</title><content type='html'>http://muellerware.org/papers/remote-web-inspector-baby-steps.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-6499531830934844054?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6499531830934844054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6499531830934844054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6499531830934844054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6499531830934844054'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/08/debug-iphone-app.html' title='debug iphone app'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2035536755066867450</id><published>2011-05-07T16:06:00.000-07:00</published><updated>2011-05-07T17:40:25.104-07:00</updated><title type='text'>push notitfication</title><content type='html'>&lt;a href="http://dalelane.co.uk/blog/?p=938"&gt;http://dalelane.co.uk/blog/?p=938&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;xtify&lt;/div&gt;&lt;div&gt;MQTT&lt;/div&gt;&lt;div&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/8066513-2035536755066867450?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2035536755066867450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2035536755066867450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2035536755066867450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2035536755066867450'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2011/05/push-notitfication.html' title='push notitfication'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-7235372476698547954</id><published>2010-09-09T17:13:00.000-07:00</published><updated>2010-09-09T17:14:39.083-07:00</updated><title type='text'>browser url checking for certificate</title><content type='html'>http://fusesource.com/docs/broker/5.3/security/i382183.html&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="d0e1504"&gt;The HTTPS URL integrity check is specified by RFC 2818, published by the Internet     Engineering Task Force (IETF) at &lt;/a&gt;&lt;a class="link" href="http://www.ietf.org/rfc/rfc2818.txt" target="_blank"&gt;http://www.ietf.org/rfc/rfc2818.txt&lt;/a&gt;.&lt;/p&gt;&lt;div class="simplesect" title="How to specify the certificate identity"&gt;&lt;div xmlns="" d="http://docbook.org/ns/docbook" class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 xmlns="http://www.w3.org/1999/xhtml" class="title"&gt;&lt;a saxon="http://icl.com/saxon" id="d0e1511"&gt;How to specify the certificate identity&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="d0e1511"&gt;The certificate identity used in the URL integrity check can be specified in one of the     following ways:&lt;/a&gt;&lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul class="itemizedlist"&gt;&lt;li class="listitem"&gt;&lt;p&gt;&lt;a class="link" href="http://fusesource.com/docs/broker/5.3/security/i382183.html#i382243" title="Using commonName"&gt;Using commonName&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li class="listitem"&gt;&lt;p&gt;&lt;a class="link" href="http://fusesource.com/docs/broker/5.3/security/i382183.html#i382248" title="Using subjectAltName (multi-homed hosts)"&gt;Using subectAltName&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="simplesect" title="Using commonName"&gt;&lt;div xmlns="" d="http://docbook.org/ns/docbook" class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 xmlns="http://www.w3.org/1999/xhtml" class="title"&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;Using commonName&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;The usual way to specify the certificate identity (for the purpose of the URL integrity     check) is through the Common Name (CN) in the subject DN of the certificate.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;For example, if a server supports secure TLS connections at the following URL:&lt;/a&gt;&lt;/p&gt;&lt;pre class="programlisting"&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;https://www.progress.com/secure&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;The corresponding server certificate would have the following subject DN:&lt;/a&gt;&lt;/p&gt;&lt;pre class="programlisting"&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;C=IE,ST=Co. Dublin,L=Dublin,O=Progress,&lt;br /&gt;OU=System,CN=www.progress.com&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;Where the CN has been set to the host name, &lt;code class="literal"&gt;www.progress.com&lt;/code&gt;.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382243"&gt;For details of how to set the subject DN in a new certificate, see &lt;/a&gt;&lt;a class="xref" href="http://fusesource.com/docs/broker/5.3/security/i382664.html" title="Use the CA to Create Signed Certificates in a Java Keystore"&gt;Use the CA to Create Signed Certificates in a Java Keystore&lt;/a&gt; and &lt;a class="xref" href="http://fusesource.com/docs/broker/5.3/security/i382664.html" title="Use the CA to Create Signed Certificates in a Java Keystore"&gt;Use the CA to Create Signed Certificates in a Java Keystore&lt;/a&gt; .&lt;/p&gt;&lt;/div&gt;&lt;div xmlns="" d="http://docbook.org/ns/docbook" class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 xmlns="http://www.w3.org/1999/xhtml" class="title"&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;Using subjectAltName (multi-homed hosts)&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;Using the subject DN’s Common Name for the certificate identity has the disadvantage that     only &lt;span class="emphasis"&gt;&lt;em&gt;one&lt;/em&gt;&lt;/span&gt; host name can be specified at a time. If you deploy a certificate     on a multi-homed host, however, you might find it is practical to allow the certificate to be     used with &lt;span class="emphasis"&gt;&lt;em&gt;any&lt;/em&gt;&lt;/span&gt; of the multi-homed host names. In this case, it is necessary     to define a certificate with multiple, alternative identities, and this is only possible using     the &lt;code class="literal"&gt;subjectAltName&lt;/code&gt; certificate extension.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;For example, if you have a multi-homed host that supports connections to either of the     following host names:&lt;/a&gt;&lt;/p&gt;&lt;pre class="programlisting"&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;www.progress.com&lt;br /&gt;fusesource.com&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;Then you can define a &lt;code class="literal"&gt;subjectAltName&lt;/code&gt; that explicitly lists both of these     DNS host names. If you generate your certificates using the &lt;span class="command"&gt;&lt;strong&gt;openssl&lt;/strong&gt;&lt;/span&gt; utility,     edit the relevant line of your &lt;code class="filename"&gt;openssl.cnf&lt;/code&gt; configuration file to specify     the value of the &lt;code class="literal"&gt;subjectAltName&lt;/code&gt; extension, as follows:&lt;/a&gt;&lt;/p&gt;&lt;pre class="programlisting"&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;subjectAltName=DNS:www.progress.com,DNS:fusesource.com&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;Where the HTTPS protocol matches the server host name against either of the DNS host names     listed in the &lt;code class="literal"&gt;subjectAltName&lt;/code&gt; (the &lt;code class="literal"&gt;subjectAltName&lt;/code&gt; takes     precedence over the Common Name).&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;The HTTPS protocol also supports the wildcard character, &lt;code class="literal"&gt;*&lt;/code&gt;, in host     names. For example, you can define the &lt;code class="literal"&gt;subjectAltName&lt;/code&gt; as follows:&lt;/a&gt;&lt;/p&gt;&lt;pre class="programlisting"&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;subjectAltName=DNS:*.progress.com&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;&lt;a saxon="http://icl.com/saxon" id="i382248"&gt;This certificate identity matches any three-component host name in the domain      &lt;code class="literal"&gt;progress.com&lt;/code&gt;. For example, the wildcarded host name matches either      &lt;code class="literal"&gt;www.progress.com&lt;/code&gt; or &lt;code class="literal"&gt;fusesource.com&lt;/code&gt;, but does not match      &lt;code class="literal"&gt;www.fusesource.com&lt;/code&gt;.&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-7235372476698547954?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/7235372476698547954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=7235372476698547954' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7235372476698547954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7235372476698547954'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2010/09/browser-url-checking-for-certificate.html' title='browser url checking for certificate'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-1321811333723101948</id><published>2010-05-18T22:46:00.001-07:00</published><updated>2010-05-18T23:37:11.688-07:00</updated><title type='text'>GC</title><content type='html'>http://it.cybergav.in/2009/09/22/how-to-deal-with-concurrent-mode-failures-in-the-hotspot-jvm/&lt;br /&gt;&lt;br /&gt;http://java.sun.com/developer/technicalArticles/Programming/GCPortal/&lt;br /&gt;&lt;br /&gt;http://web.princeton.edu/sites/isapps/jasig/2004summerWestminster/Presentations/java-sig2004_garbagecollection.pdf&lt;br /&gt;&lt;br /&gt;http://developers.sun.com/mobility/midp/articles/garbage/#14.2.2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-1321811333723101948?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/1321811333723101948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=1321811333723101948' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1321811333723101948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1321811333723101948'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2010/05/gc.html' title='GC'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-4674034641419215982</id><published>2009-05-25T22:19:00.001-07:00</published><updated>2009-05-25T22:19:41.448-07:00</updated><title type='text'>find out disk space usage</title><content type='html'>&lt;pre&gt;#!/bin/sh df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do   echo $output   usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1  )   partition=$(echo $output | awk '{ print $2 }' )   if [ $usep -ge 90 ]; then     echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date)" |      mail -s "Alert: Almost out of disk space $usep%" you@somewhere.com   fi done &lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;MySql show table status&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-4674034641419215982?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/4674034641419215982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=4674034641419215982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4674034641419215982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4674034641419215982'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2009/05/find-out-disk-space-usage.html' title='find out disk space usage'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-4320482774585400113</id><published>2009-05-25T20:40:00.000-07:00</published><updated>2009-05-25T20:41:38.387-07:00</updated><title type='text'>information retrieval search</title><content type='html'>&lt;a href="http://people.ischool.berkeley.edu/~hearst/irbook/"&gt;http://people.ischool.berkeley.edu/~hearst/irbook/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.stanford.edu/class/cs240/readings/dean.pdf"&gt;http://www.stanford.edu/class/cs240/readings/dean.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-4320482774585400113?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/4320482774585400113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=4320482774585400113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4320482774585400113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4320482774585400113'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2009/05/information-retrieval-search.html' title='information retrieval search'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-4025560151333463035</id><published>2009-04-20T10:45:00.001-07:00</published><updated>2009-04-20T10:45:16.914-07:00</updated><title type='text'>skip DTD validation</title><content type='html'>http://stackoverflow.com/questions/243728/how-to-disable-dtd-at-runtime-in-javas-xpath&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-4025560151333463035?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/4025560151333463035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=4025560151333463035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4025560151333463035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4025560151333463035'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2009/04/skip-dtd-validation.html' title='skip DTD validation'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6868882846456619024</id><published>2009-04-08T16:11:00.001-07:00</published><updated>2009-04-08T16:26:27.480-07:00</updated><title type='text'>DAO</title><content type='html'>&lt;a href="http://www.ibm.com/developerworks/library/j-dao/"&gt;http://www.ibm.com/developerworks/library/j-dao/&lt;/a&gt;&lt;div&gt;&lt;a href="http://java.sun.com/blueprints/patterns/DAO.html"&gt;http://java.sun.com/blueprints/patterns/DAO.html&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/8066513-6868882846456619024?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6868882846456619024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6868882846456619024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6868882846456619024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6868882846456619024'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2009/04/dao.html' title='DAO'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6718025309112983701</id><published>2009-04-04T20:38:00.001-07:00</published><updated>2009-04-04T20:39:09.665-07:00</updated><title type='text'>java tip</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;http://www.javaspecialists.eu/archive/Issue142.html&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;http://www.1001javatips.com/&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-6718025309112983701?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6718025309112983701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6718025309112983701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6718025309112983701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6718025309112983701'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2009/04/java-tip.html' title='java tip'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2737641549855846308</id><published>2008-10-08T21:48:00.000-07:00</published><updated>2008-10-08T21:49:49.680-07:00</updated><title type='text'>javascript template</title><content type='html'>http://code.google.com/p/trimpath/wiki/JavaScriptTemplates&lt;br /&gt;&lt;br /&gt;TrimPath&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2737641549855846308?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2737641549855846308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2737641549855846308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2737641549855846308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2737641549855846308'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/10/javascript-template.html' title='javascript template'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-938386025488274394</id><published>2008-09-09T16:53:00.000-07:00</published><updated>2008-09-09T16:54:18.130-07:00</updated><title type='text'>keytool  keystore</title><content type='html'>&lt;div&gt;&lt;span class="597075123-09092008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;(Java 6 allows user  to import private key and cert now)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;a href="http://cunning.sharp.fm/2008/06/importing_private_keys_into_a.html"&gt;http://cunning.sharp.fm/2008/06/importing_private_keys_into_a.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;span class="597075123-09092008"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;(For older library,  you may need the keyimport program)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;a href="http://www.nealgroothuis.name/import-a-private-key-into-a-java-keystore/"&gt;http://www.nealgroothuis.name/import-a-private-key-into-a-java-keystore/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-938386025488274394?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/938386025488274394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=938386025488274394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/938386025488274394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/938386025488274394'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/09/keytool-keystore.html' title='keytool  keystore'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-8014001193483906594</id><published>2008-08-13T23:55:00.000-07:00</published><updated>2008-08-13T23:56:45.050-07:00</updated><title type='text'>ssl certificate openssl</title><content type='html'>http://www.noah.org/wiki/CSR_Apache&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-8014001193483906594?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/8014001193483906594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=8014001193483906594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/8014001193483906594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/8014001193483906594'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/08/ssl-certificate-openssl.html' title='ssl certificate openssl'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-3603834338924234144</id><published>2008-08-06T21:05:00.001-07:00</published><updated>2008-08-06T21:05:44.503-07:00</updated><title type='text'>openssl conver pem der ber</title><content type='html'>http://www.middleware.vt.edu/doku.php?id=middleware:ed:edid:usage%20&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-3603834338924234144?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/3603834338924234144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=3603834338924234144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3603834338924234144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3603834338924234144'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/08/openssl-conver-pem-der-ber.html' title='openssl conver pem der ber'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-1568079663061131360</id><published>2008-07-23T14:08:00.000-07:00</published><updated>2008-07-23T14:11:02.403-07:00</updated><title type='text'>hibernate lazy</title><content type='html'>http://blog.xebia.com/2008/03/08/advanced-hibernate-proxy-pitfalls/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-1568079663061131360?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/1568079663061131360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=1568079663061131360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1568079663061131360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1568079663061131360'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/07/hibernate-lazy.html' title='hibernate lazy'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2706743342641697623</id><published>2008-07-12T17:50:00.001-07:00</published><updated>2008-07-12T17:50:29.579-07:00</updated><title type='text'>trapgen</title><content type='html'>http://www.ncomtech.com/trapgen.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2706743342641697623?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2706743342641697623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2706743342641697623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2706743342641697623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2706743342641697623'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/07/trapgen.html' title='trapgen'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-169054686387420102</id><published>2008-07-11T20:47:00.000-07:00</published><updated>2008-07-11T20:48:15.250-07:00</updated><title type='text'>mysql vs postgres comparison</title><content type='html'>http://www-css.fnal.gov/dsg/external/freeware/pgsql-vs-mysql.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-169054686387420102?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/169054686387420102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=169054686387420102' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/169054686387420102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/169054686387420102'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/07/mysql-vs-postgres-comparison.html' title='mysql vs postgres comparison'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-5937691174344134758</id><published>2008-06-28T17:43:00.001-07:00</published><updated>2008-06-28T17:43:47.295-07:00</updated><title type='text'>wireshark ssl</title><content type='html'>http://blogs.sun.com/beuchelt/entry/decrypting_ssl_traffic_with_wireshark&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-5937691174344134758?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/5937691174344134758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=5937691174344134758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5937691174344134758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5937691174344134758'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/06/wireshark-ssl.html' title='wireshark ssl'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-8122468429907281320</id><published>2008-06-27T23:04:00.000-07:00</published><updated>2008-06-27T23:05:13.298-07:00</updated><title type='text'>mysql</title><content type='html'>http://hackmysql.com/mysqlsla_filters&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-8122468429907281320?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/8122468429907281320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=8122468429907281320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/8122468429907281320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/8122468429907281320'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/06/mysql.html' title='mysql'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-5413226616726200634</id><published>2008-06-04T10:33:00.000-07:00</published><updated>2008-06-04T10:34:08.871-07:00</updated><title type='text'>openssl</title><content type='html'>&lt;a href="http://security.ncsa.uiuc.edu/research/grid-howtos/usefulopenssl.php"&gt;http://security.ncsa.uiuc.edu/research/grid-howtos/usefulopenssl.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-5413226616726200634?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/5413226616726200634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=5413226616726200634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5413226616726200634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5413226616726200634'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/06/openssl.html' title='openssl'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-3813449907992188719</id><published>2008-05-17T16:15:00.001-07:00</published><updated>2008-05-17T16:15:41.189-07:00</updated><title type='text'>ldap</title><content type='html'>http://www.sybase.com/content/1026313/SYSD1039LDAP_WP.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-3813449907992188719?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/3813449907992188719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=3813449907992188719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3813449907992188719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3813449907992188719'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/05/ldap.html' title='ldap'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-4936559616511153517</id><published>2008-03-30T22:23:00.001-07:00</published><updated>2008-03-30T22:23:50.786-07:00</updated><title type='text'>memory leak</title><content type='html'>http://www.ibm.com/developerworks/java/library/j-jtp11225/index.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-4936559616511153517?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/4936559616511153517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=4936559616511153517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4936559616511153517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/4936559616511153517'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/03/memory-leak.html' title='memory leak'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-3703185842553792592</id><published>2008-03-30T16:12:00.000-07:00</published><updated>2008-03-30T16:13:03.774-07:00</updated><title type='text'>certificate management tool</title><content type='html'>TinyCA&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-3703185842553792592?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/3703185842553792592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=3703185842553792592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3703185842553792592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3703185842553792592'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/03/certificate-management-tool.html' title='certificate management tool'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-1299657738630334428</id><published>2008-03-23T20:03:00.000-07:00</published><updated>2008-03-23T20:04:19.123-07:00</updated><title type='text'>garbage collector</title><content type='html'>http://chaoticjava.com/posts/parallel-and-concurrent-garbage-collectors/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-1299657738630334428?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/1299657738630334428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=1299657738630334428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1299657738630334428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1299657738630334428'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/03/garbage-collector.html' title='garbage collector'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-7600023827224165260</id><published>2008-03-10T22:08:00.000-07:00</published><updated>2008-03-12T21:29:55.145-07:00</updated><title type='text'>java nio</title><content type='html'>&lt;a href="http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Supplements/Chapter09/nio.html"&gt;http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Supplements/Chapter09/nio.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://access1.sun.com/techarticles/BuffersAPI/BuffersAPIFundamentals.html#buf2"&gt;http://access1.sun.com/techarticles/BuffersAPI/BuffersAPIFundamentals.html#buf2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-7600023827224165260?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/7600023827224165260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=7600023827224165260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7600023827224165260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7600023827224165260'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/03/java-nio_10.html' title='java nio'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-895468765909490645</id><published>2008-03-10T21:04:00.001-07:00</published><updated>2008-03-10T21:04:53.634-07:00</updated><title type='text'>java nio</title><content type='html'>http://www.scribd.com/doc/267405/-Java-NIO-with-Grizzly&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-895468765909490645?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/895468765909490645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=895468765909490645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/895468765909490645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/895468765909490645'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/03/java-nio.html' title='java nio'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-8080327505191189139</id><published>2008-03-10T15:17:00.000-07:00</published><updated>2008-03-10T15:18:51.704-07:00</updated><title type='text'>threadlocal</title><content type='html'>&lt;a href="http://www.ddj.com/java/184405382"&gt;http://www.ddj.com/java/184405382&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;static final private anonymous class for the threadlocal subclass&lt;br /&gt;each thread will have the container ( the get()) which has a reference to the instance of threadlocal. conceptually, there is a map with key the currentthread and the object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-8080327505191189139?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/8080327505191189139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=8080327505191189139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/8080327505191189139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/8080327505191189139'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/03/threadlocal.html' title='threadlocal'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-3010111245833131322</id><published>2008-03-04T13:22:00.001-08:00</published><updated>2008-03-04T13:22:27.135-08:00</updated><title type='text'>HTML calendar</title><content type='html'>Bazillyo's Spiffy DHTML Popup Calendar&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-3010111245833131322?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/3010111245833131322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=3010111245833131322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3010111245833131322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3010111245833131322'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/03/html-calendar.html' title='HTML calendar'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-5471746016138848949</id><published>2008-02-19T18:59:00.000-08:00</published><updated>2008-02-19T19:00:12.776-08:00</updated><title type='text'>webservice nillable null value</title><content type='html'>http://www.ibm.com/developerworks/xml/library/ws-tip-null.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-5471746016138848949?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/5471746016138848949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=5471746016138848949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5471746016138848949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/5471746016138848949'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/02/webservice-nillable-null-value.html' title='webservice nillable null value'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-7767802349158779912</id><published>2008-02-18T13:06:00.001-08:00</published><updated>2008-02-18T13:06:30.491-08:00</updated><title type='text'>escape urlencode</title><content type='html'>http://xkr.us/articles/javascript/encode-compare/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-7767802349158779912?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/7767802349158779912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=7767802349158779912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7767802349158779912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7767802349158779912'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/02/escape-urlencode.html' title='escape urlencode'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2474984679172568532</id><published>2008-01-26T19:41:00.001-08:00</published><updated>2008-01-26T19:41:42.505-08:00</updated><title type='text'>firefox clipboard</title><content type='html'>http://www.jeffothy.com/weblog/clipboard-copy/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2474984679172568532?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2474984679172568532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2474984679172568532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2474984679172568532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2474984679172568532'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/01/firefox-clipboard.html' title='firefox clipboard'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-3786247061647657157</id><published>2008-01-20T22:52:00.001-08:00</published><updated>2008-01-20T22:52:47.218-08:00</updated><title type='text'>javascript diff tool</title><content type='html'>&lt;a href="http://snowtide.com/jsdifflib"&gt;http://snowtide.com/jsdifflib&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-3786247061647657157?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/3786247061647657157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=3786247061647657157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3786247061647657157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3786247061647657157'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2008/01/javascript-diff-tool.html' title='javascript diff tool'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-7988807027767360463</id><published>2007-11-30T09:30:00.000-08:00</published><updated>2007-11-30T09:31:56.200-08:00</updated><title type='text'>xsd import include</title><content type='html'>http://developers.sun.com/jsenterprise/nb_enterprise_pack/reference/techart/namespaces2.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-7988807027767360463?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/7988807027767360463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=7988807027767360463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7988807027767360463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7988807027767360463'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/11/xsd-import-include.html' title='xsd import include'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-1601521515973352949</id><published>2007-11-17T18:23:00.000-08:00</published><updated>2007-11-17T18:24:04.012-08:00</updated><title type='text'>wsdl</title><content type='html'>http://www.ibm.com/developerworks/webservices/library/ws-castor/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-1601521515973352949?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/1601521515973352949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=1601521515973352949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1601521515973352949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1601521515973352949'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/11/wsdl.html' title='wsdl'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-7497231302882364770</id><published>2007-11-06T16:54:00.000-08:00</published><updated>2007-11-06T18:15:00.386-08:00</updated><title type='text'>pkcs</title><content type='html'>&lt;a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sag_cmimportexport.mspx?mfr=true"&gt;http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sag_cmimportexport.mspx?mfr=true&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.citrix.com/article/CTX109031&amp;amp;printable=true"&gt;http://support.citrix.com/article/CTX109031&amp;amp;printable=true&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;About exporting certificate from IIS to netscaler&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dev2dev.bea.com/pub/a/2006/08/pfx-pem-certificate-formats.html"&gt;http://dev2dev.bea.com/pub/a/2006/08/pfx-pem-certificate-formats.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.grennan.com/CA-HOWTO-1.html"&gt;http://www.grennan.com/CA-HOWTO-1.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-7497231302882364770?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/7497231302882364770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=7497231302882364770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7497231302882364770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/7497231302882364770'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/11/pkcs.html' title='pkcs'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2984746680375778909</id><published>2007-10-25T11:23:00.000-07:00</published><updated>2007-10-27T10:17:37.034-07:00</updated><title type='text'>vmware standford</title><content type='html'>&lt;a href="http://forum.stanford.edu/events/archive/security-workshop/CSW-02-Speaker-Slides/Edouard-Bugnion.ppt#362,18,I/O"&gt;http://forum.stanford.edu/events/archive/security-workshop/CSW-02-Speaker-Slides/Edouard-Bugnion.ppt#362,18,I/O&lt;/a&gt; Interposition example: Networking&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download3.vmware.com/vmworld/2005/pac195-a.pdf"&gt;http://download3.vmware.com/vmworld/2005/pac195-a.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cs.binghamton.edu/~kchiu/cs552-f04/slides/virtual_machines.ppt#280,5,Advantages/Disadvantages"&gt;http://www.cs.binghamton.edu/~kchiu/cs552-f04/slides/virtual_machines.ppt#280,5,Advantages/Disadvantages&lt;/a&gt; of Virtual Machines&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2984746680375778909?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2984746680375778909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2984746680375778909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2984746680375778909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2984746680375778909'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/10/vmware-standford.html' title='vmware standford'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2281048412216193638</id><published>2007-08-04T19:50:00.000-07:00</published><updated>2007-08-04T19:51:54.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='t'/><title type='text'>xmlresponse AJAX</title><content type='html'>catch xmlHttp.responseXML&lt;br /&gt;if(!xmlResponse !xmlResponse.documentElement) throw&lt;br /&gt;var nodeName = xmlResponse.documentElmeent.nodeName;&lt;br /&gt;if(nodeName == "parsererror") throw ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2281048412216193638?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2281048412216193638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2281048412216193638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2281048412216193638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2281048412216193638'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/08/xmlresponse-ajax.html' title='xmlresponse AJAX'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2197475934436916809</id><published>2007-08-04T19:38:00.000-07:00</published><updated>2007-08-04T19:40:40.678-07:00</updated><title type='text'>create XML document</title><content type='html'>if(document.implementation &amp;&amp;amp;amp; document.implementation.createDocument){ xmlDoc = document.implementation.createDocument("","",null); } else if (window.ActiveXObject){ xmlDoc = new ActiveXObject("Microsoft.XMLDOM");&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2197475934436916809?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2197475934436916809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2197475934436916809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2197475934436916809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2197475934436916809'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/08/create-xml-document.html' title='create XML document'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-9092863323995126655</id><published>2007-08-04T19:32:00.001-07:00</published><updated>2007-08-04T19:32:55.741-07:00</updated><title type='text'>velocity event cartridge</title><content type='html'>&lt;a href="http://www.java2s.com/Code/Java/Velocity/AsimpledemonstrationofhowtheeventhandlingfeaturesoftheVelocityServletEngineareused.htm"&gt;http://www.java2s.com/Code/Java/Velocity/AsimpledemonstrationofhowtheeventhandlingfeaturesoftheVelocityServletEngineareused.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-9092863323995126655?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/9092863323995126655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=9092863323995126655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/9092863323995126655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/9092863323995126655'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/08/velocity-event-cartridge.html' title='velocity event cartridge'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-92942872849843582</id><published>2007-07-18T22:23:00.001-07:00</published><updated>2007-07-18T22:23:31.750-07:00</updated><title type='text'>stop a thread</title><content type='html'>&lt;a href="http://www.forward.com.au/javaProgramming/threadReturnsPackage/ToCatchAThread.html"&gt;http://www.forward.com.au/javaProgramming/threadReturnsPackage/ToCatchAThread.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-92942872849843582?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/92942872849843582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=92942872849843582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/92942872849843582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/92942872849843582'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/07/stop-thread.html' title='stop a thread'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-2658835460371624375</id><published>2007-03-28T10:46:00.001-07:00</published><updated>2007-03-28T10:46:33.433-07:00</updated><title type='text'>html hint</title><content type='html'>&lt;a href="http://www.cs.tut.fi/~jkorpela/"&gt;http://www.cs.tut.fi/~jkorpela/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-2658835460371624375?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/2658835460371624375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=2658835460371624375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2658835460371624375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/2658835460371624375'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/03/html-hint.html' title='html hint'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-3711497540548532949</id><published>2007-03-18T18:30:00.000-07:00</published><updated>2007-03-18T18:31:34.814-07:00</updated><title type='text'>youtube</title><content type='html'>&lt;a href="http://blog.go4teams.com/?p=56"&gt;http://blog.go4teams.com/?p=56&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-3711497540548532949?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/3711497540548532949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=3711497540548532949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3711497540548532949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/3711497540548532949'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/03/youtube.html' title='youtube'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-6380781856664952944</id><published>2007-03-13T17:15:00.000-07:00</published><updated>2007-03-13T18:05:33.092-07:00</updated><title type='text'>certiface PKCS12</title><content type='html'>&lt;a href="http://www.dartmouth.edu/~pkilab/pages/Move_Keypair.html"&gt;http://www.dartmouth.edu/~pkilab/pages/Move_Keypair.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="Top"&gt;&lt;br /&gt;Moving Keys and Certificates&lt;br /&gt;Your private key and public key certificate are saved on the computer from which you enrolled in the PKI system. For the purposes of web authentication it is possible to enroll more than once, but this can be confusing for other uses of PKI like encryption and digital signature. In those cases it is preferrable to use the same private key and public key certificate on multiple web browsers and computers. This page explains how to move your PKI private key and personal certificate to another web browser or computer. There are 3 steps, exporting the keys to a file, transferring the file and importing the keys into another configuration. Because the applications of a PKI rely on keeping your private key "private", the process for doing this keeps the information encrypted as it is being moved.&lt;br /&gt;The PKCS standards define a format called PKCS #12 for transferring a private key and a public key certificates. (A PKCS #7 file is used to transfer only public key certificates and NOT the private key.) PKCS #12 is supported by Nestcape, Mozilla and versions of Internet Explorer after 5.5. On Windows, the filetype .pfx is a synonym for the .p12 file type used by Netscape/Mozilla. Some older versions of Windows need file extension definitions to be added for ".p12".&lt;br /&gt;A PKCS #12 file includes a password-encrypted envelope to protect the private key. This password is used only for this file and has no connection to the password used to secure your keys in your web browser or operating system key storage. The password is created when you create the .p12 export file and must be provided to decrypt the contents when you import the file somewhere else. The key export and import functions are usually part of the user interface provided to manage certificates in web browser. Be sure to transfer the binary file by a method that doesn't mistakenly convert it to text. This is easy to do since the settings in many programs default to "text" files. The file can be e-mailed as a binary attachment, transferred as a binary file with FTP or copied to and from a removable or shared disk. A copy of a PKCS #12 file containing your provate key and certificate the on a removable disk can be a useful backup if the hard disk on your computer fails.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wso2.org/library/767"&gt;http://wso2.org/library/767&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wso2.org/"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/about"&gt;About&lt;/a&gt; &lt;a href="http://wso2.org/feedback"&gt;Feedback&lt;/a&gt; &lt;a class="right_most" href="http://www.wso2.com/"&gt;wso2.com&lt;/a&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;a href="http://wso2.org/"&gt;Home&lt;/a&gt;&lt;br /&gt;&lt;a class="cl" href="http://wso2.org/library"&gt;Library&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/svn"&gt;SVN&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/wiki"&gt;Wiki&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/jira"&gt;JIRA&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/mail"&gt;Mail&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/forum"&gt;Forum&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/downloads"&gt;Downloads&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/tools"&gt;Tools&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/blog"&gt;Blog&lt;/a&gt;&lt;br /&gt;Library&lt;br /&gt;&lt;a href="http://wso2.org/library/articles"&gt;Articles&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/library/tutorials"&gt;Tutorials&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/library/interviews"&gt;Interviews&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/library/presentations"&gt;Presentations&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/library/podcasts"&gt;Podcasts&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/library/knowledge-base"&gt;Knowledge Base&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/library/submit"&gt;Submit Story&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/aggregator"&gt;Aggregator&lt;/a&gt;&lt;br /&gt;Projects&lt;br /&gt;WSO2&lt;br /&gt;&lt;a href="http://wso2.org/projects/wsf"&gt;Web Services Framework&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/wsas/java"&gt;Web Services Application Server&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/esb/java"&gt;Enterprise Service Bus&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/commons"&gt;Commons&lt;/a&gt;&lt;br /&gt;Apache&lt;br /&gt;&lt;a href="http://wso2.org/projects/axis"&gt;Axis&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/axis2"&gt;Axis2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/axiom/java"&gt;AXIOM&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/kandula/java"&gt;Kandula&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/neethi/java"&gt;Neethi&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/rampart"&gt;Rampart&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/sandesha/java"&gt;Sandesha&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/sandesha2/java"&gt;Sandesha2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/savan/java"&gt;Savan&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/synapse/java"&gt;Synapse&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/projects/wss4j"&gt;WSS4J&lt;/a&gt;&lt;br /&gt;Hot on The Tank&lt;br /&gt;&lt;a title="Interview" href="http://wso2.org/library/881"&gt;IDE Integration for WSO2 WSAS - Lahiru Sandakith&lt;/a&gt;&lt;br /&gt;&lt;a title="Tutorial" href="http://wso2.org/library/880"&gt;10 Minute Guide to Installing WSO2 WSAS on WebLogic- Afkham Azeez&lt;/a&gt;&lt;br /&gt;&lt;a title="Podcast" href="http://wso2.org/library/873"&gt;W3C Workshop on Web of Services for Enterprise Computing- Jonathan Marsh&lt;/a&gt;&lt;br /&gt;&lt;a title="Download" href="http://dist.wso2.org/products/esb/java/1.0-beta-1/"&gt;Download WSO2 ESB for Java, v1.0 beta 1&lt;/a&gt;&lt;br /&gt;&lt;a title="Article" href="http://wso2.org/library/777"&gt;Flows, Phases, Handlers, and Modules- Samisa Abeysinghe&lt;/a&gt;&lt;br /&gt;&lt;a title="Article" href="http://wso2.org/library/768"&gt;JSON Support for Apache Axis2- Isuru Suriarachchi&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.wso2.com/"&gt;&lt;/a&gt;&lt;br /&gt;Personalize&lt;br /&gt;&lt;a href="http://wso2.org/user/login"&gt;Login&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wso2.org/user/register"&gt;Register&lt;/a&gt;&lt;br /&gt;Search&lt;br /&gt;&lt;br /&gt;Google Ads&lt;br /&gt;&lt;br /&gt;OpenSSL Tutorial for Apache Rampart/C&lt;br /&gt;Submitted on February 14, 2007 - 22:59. &lt;a title="" href="http://wso2.org/taxonomy/term/24/all" rel="tag/all"&gt;Tutorials&lt;/a&gt; &lt;a title="" href="http://wso2.org/taxonomy/term/266/all" rel="tag/all"&gt;Rampart &gt; C&lt;/a&gt;&lt;br /&gt;This tutorial by Kaushalye Kapuruge explains how to use the OpenSSL toolkit to configure &lt;a href="http://wso2.org/projects/rampart/c"&gt;Apache Rampart/C&lt;/a&gt;, security module of &lt;a href="http://ws.apache.org/axis2/c"&gt;Apache Axis2/C&lt;/a&gt; in your system. This includes the necessary practical knowledge as well as the conceptual knowledge. For example, installing OpenSSL, obtaining certificates, how to configure a key store, etc. You are always welcome to refer to &lt;a href="http://www.openssl.org/docs/"&gt;OpenSSL documentation&lt;/a&gt; and other related resources, but it usually takes time to connect them together. We suggest that you to complete this tutorial before configuring Rampart/C.&lt;br /&gt;X509 Certificates, Public and Private Keys in Brief&lt;br /&gt;In public key infrastructure we use two keys, namely Public key and Private key. The relationship between these two is that one encrypts data, and the other decrypts it. The difference is that one is kept a secret (hence named private key) whilst the other is published. An x509 certificate is issued by a certificate authority binding such a public key. A Certificate Authority (CA) is a trusted third party that issues digital certificates for other parties. In Rampart/C, we use X509 certificates to encrypt messages and corresponding private keys to decrypt the messages.&lt;br /&gt;Ways You Can Use Certificates/Keys in Rampart/C&lt;br /&gt;There are two ways you can use x509 certificates and keys.&lt;br /&gt;As a single entity - PEM format&lt;br /&gt;In a Key Store - PKCS12 format&lt;br /&gt;PEM Format&lt;br /&gt;Privacy Enhanced Mail (PEM) is the widely used format for certificates and keys. A PEM file contains two header lines that wraps base64 encoded certificate data. The format of a X509 certificate is as follows.------BEGIN CERTIFICATE-----(Base64 encoded certificate data)------END CERTIFICATE----If you need to configure the receiver's certificate to encrypt data, you have to have it in PEM format.&lt;br /&gt;PKCS12 Key Stores&lt;br /&gt;PKCS12 is a standard that stores certificate and private key pairs in a secure way. Usually, a certificate/key pair is stored with a password. Unlike a PEM file, PKCS12 contains binary data and may contain more than one certificate. OpenSSL provides tools to convert from/to PKCS12 format. We will describe how to do this &lt;a href="http://wso2.org/library/767#Convert"&gt;later&lt;/a&gt;. Rampart/C supports PKCS12 key stores. The file extension should be .pfx.&lt;br /&gt;Installing OpenSSL&lt;br /&gt;UNIX&lt;br /&gt;The quickest and easiest way to install OpenSSL in your system is through the Advanced Package Tool (apt).%apt-get install openssl.&lt;br /&gt;This will install the latest OpenSSL version available in your system.&lt;br /&gt;The other way is to &lt;a href="http://www.openssl.org/source/"&gt;download&lt;/a&gt; the tarball from the OpenSSL official Web site. For example, if you have downloaded openssl-0.9.x.tar.gz, extract it first.%gunzip openssl-0.9.x.tar.gz%tar xvf openssl-0.9.x.tarThen go to the directory openssl-0.9.x.&lt;br /&gt;To install it in the default location (i.e./usr/local/ssl), use the following command sequence.%./config%make%make install&lt;br /&gt;Win32&lt;br /&gt;There are many &lt;a href="http://www.openssl.org/related/binaries.html"&gt;vendors who provide binary distributions&lt;/a&gt; of the latest OpenSSL release. You can then follow the installation procedure, which is vendor specific.&lt;br /&gt;Obtaining a Certificate&lt;br /&gt;There are three methods to obtain an x509 certificate.&lt;br /&gt;Generate a self-signed certificate.&lt;br /&gt;Signed by a local CA&lt;br /&gt;Signed by a recognized authority such as Verisign&lt;br /&gt;Generate a Self-Signed Certificate&lt;br /&gt;This is the simplest procedure, but is of very little use. For testing purposes you might need to generate a certificate quickly. Use the following command to generate a self-signed x509 certificate (mycert.pem), which is valid for 365 days and an RSA key (mykey.pem) of length 1024.openssl req -x509 -nodes -days 365 -newkey rsa:1024 \-keyout mykey.pem -out mycert.pem&lt;br /&gt;Then you have to answer a few questions. The information you provide by answering these questions will be stored in the certificate.Country Name (2 letter code) [AU]:State or Province Name (full name) [Some-State]:Locality Name (eg, city) []:Organization Name (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name (eg, section) []:Common Name (eg, YOUR name) []:Email Address []:&lt;br /&gt;Create Your Own CA and Sign Your Certificates&lt;br /&gt;A self-signed certificate is of no use as it is not signed by a third party. There are well known third parties like &lt;a href="http://www.verisign.com/"&gt;Verisign&lt;/a&gt; and &lt;a href="http://www.thawte.com/"&gt;Thawte&lt;/a&gt;. However, getting a certificate signed is a complex and costly process. If you need to form a small trust community (e.g. for your company or with your clients) you can create your own Certificate Authority. This process has been simplified thanks to a pearl script available in OpenSSL distribution. If you have used default installation settings, this script (CA.pl) can be located in /usr/lib/ssl/misc/CA.pl. First create a directory for your CA. Then copy CA.pl and /usr/lib/ssl/openssl.cnf to the directory you just created. Now run the CA.pl script.%./CA.pl -newca&lt;br /&gt;If you press Enter, the script will create a new certificate/key pair for you. If you already have a certificate and you need to use it, just type the filename. Now you have a certificate authority setup in a sub directory called "demoCA". Simple, right?&lt;br /&gt;Let's try to sign a certificate using the CA we have just set up. Copy your certificate request to the current directory and rename it to newreq.pem (In the next section, we will discuss how to generate a certificate request). Next, issue the following command.%./CA.pl -sign&lt;br /&gt;If everything is successful and the request is a valid one, a new certificate called newcert.pem will be created in the same directory.&lt;br /&gt;Sign Your Certificate by a Recognized Authority&lt;br /&gt;Signing you certificate by a recognized certificate authority consists of two steps. First you have to generate a certificate request locally. Then you need to fill a form providing some information and send it to the CA.&lt;br /&gt;Here we describe how to generate such a request using OpenSSL. First you need to generate a private key. If you already have a private key skip this step.%openssl genrsa -out x.key 1024&lt;br /&gt;Then use that private key to generate your request to the CA.%openssl req -new -key x.key -out request.pem&lt;br /&gt;This will create a file called request.pem from the private key (x.key). The requset file has the following format.-----BEGIN CERTIFICATE REQUEST-----(Base64 encoded certificate request data)-----END CERTIFICATE REQUEST-----&lt;br /&gt;Then you have to provide your information to the certificate authority. Usually this can be done by sending a fax or by filling an online application. Make sure that you are sending accurate information and especially check your request and the information in it. Use the following commands for verification.%openssl req -noout -text -in request.pem%openssl req -noout -verify -key x.key -in request.pem&lt;a title="Convert" name="Convert"&gt;&lt;/a&gt;&lt;br /&gt;Exporting PEM Files to PKCS12 Key Stores&lt;br /&gt;Use the openssl pkcs12 tool to export a certificate/key pair to a pkcs12 store. Assume that you have a key (x.key) and a certificate (x.cert). The first step is to have both of them in a single file (x.pem). Then export the pair to a pkcs12 keystore (x.pfx).%cat x.cert x.key &gt; x.pem%openssl pkcs12 -export -in x.pem -out x.pfx&lt;br /&gt;Then enter a password to secure your keys in the keystore.&lt;br /&gt;Extracting Key/Cert Pair from a PKCS12 Key Store&lt;br /&gt;If you have your keys/certificates in a pkcs12 keystore, you might need to extract them. For example, you might need to give you certificate to another party. Here, we will show you how you can do this.%openssl pkcs12 -in x.pfx -clcerts -nokeys -out x2.cert&lt;br /&gt;Enter the password you used in the export process. Similarly, you can get the private key too.%openssl pkcs12 -in x.pfx -nocerts -out x2.key&lt;br /&gt;Extract Information from a Certificate&lt;br /&gt;If you get a certificate from another party, you might need to extract information from it. An x509 certificate contains the following information.&lt;br /&gt;Certificate version&lt;br /&gt;Serial Number&lt;br /&gt;Algorithm ID&lt;br /&gt;Issuer&lt;br /&gt;Validity period&lt;br /&gt;Subject&lt;br /&gt;Public Key Algorithm&lt;br /&gt;Subject Public Key&lt;br /&gt;Issuer Unique Identifier (Optional)&lt;br /&gt;Subject Unique Identifier (Optional)&lt;br /&gt;Extensions (Optional)&lt;br /&gt;Certificate Signature Algorithm&lt;br /&gt;Certificate Signature Use the following command to extract information from a certificate in PEM format. %openssl x509 -noout -text -in x.cert&lt;br /&gt;To extract information from a certificate, which is stored in a pkcs12 key store, use the following.%openssl pkcs12 -in x_store.pfx -nokeys -clcerts openssl x509 -noout -text&lt;br /&gt;Glossary&lt;br /&gt;PKCS12 : Public Key Cryptography Standards #12. Personal Information Exchange Syntax Standard.&lt;br /&gt;PEM: Privacy Enhanced Mail, is a standard for exchanging mails over the web in a secure way.&lt;br /&gt;X509: A standard for Public Key Infrastructure, defines formats for public key certificates and validation algorithms.&lt;br /&gt;CA: An entity issuing and validating digital certificates. &lt;a title="References" name="References"&gt;&lt;/a&gt;&lt;br /&gt;References&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://gagravarr.org/writing/openssl-certs/general.shtml"&gt;http://gagravarr.org/writing/openssl-certs/general.shtml&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-6380781856664952944?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/6380781856664952944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=6380781856664952944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6380781856664952944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/6380781856664952944'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/03/certiface-pkcs12.html' title='certiface PKCS12'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-1418498674295274920</id><published>2007-03-07T14:25:00.000-08:00</published><updated>2007-03-07T14:26:28.276-08:00</updated><title type='text'>firewall inspection SQLNET</title><content type='html'>&lt;blockquote&gt;&lt;br /&gt;&lt;a href="http://home.cfl.rr.com/dealgroup/pix/pix_page_4.htm"&gt;http://home.cfl.rr.com/dealgroup/pix/pix_page_4.htm&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-1418498674295274920?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/1418498674295274920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=1418498674295274920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1418498674295274920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/1418498674295274920'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/03/firewall-inspection-sqlnet.html' title='firewall inspection SQLNET'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-117091639335398738</id><published>2007-02-07T22:32:00.000-08:00</published><updated>2007-02-07T22:33:14.083-08:00</updated><title type='text'>html legend fieldset</title><content type='html'>http://www.htmldog.com/guides/htmladvanced/forms/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-117091639335398738?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/117091639335398738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=117091639335398738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/117091639335398738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/117091639335398738'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/02/html-legend-fieldset.html' title='html legend fieldset'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-116881918121775460</id><published>2007-01-14T15:59:00.000-08:00</published><updated>2007-01-14T15:59:41.836-08:00</updated><title type='text'>load balance</title><content type='html'>http://1wt.eu/articles/2006_lb/index_04.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-116881918121775460?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/116881918121775460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=116881918121775460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116881918121775460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116881918121775460'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2007/01/load-balance.html' title='load balance'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-116629326111365565</id><published>2006-12-16T10:20:00.000-08:00</published><updated>2006-12-16T10:21:01.353-08:00</updated><title type='text'>grapher</title><content type='html'>http://srufaculty.sru.edu/david.dailey/grapher/grapher.96.html&lt;br /&gt;&lt;br /&gt;using javascript to draw graph.&lt;br /&gt;similar to mxgraph using VML&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-116629326111365565?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/116629326111365565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=116629326111365565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116629326111365565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116629326111365565'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/12/grapher.html' title='grapher'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-116408747608254171</id><published>2006-11-20T21:36:00.000-08:00</published><updated>2006-11-20T21:37:57.496-08:00</updated><title type='text'>open source network management</title><content type='html'>http://www.mergere.com/m2book_download.jsp&lt;br /&gt;ziptie.org&lt;br /&gt;http://www.webtide.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-116408747608254171?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/116408747608254171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=116408747608254171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116408747608254171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116408747608254171'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/11/open-source-network-management.html' title='open source network management'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-116365881417242642</id><published>2006-11-15T22:32:00.000-08:00</published><updated>2006-11-15T22:34:15.663-08:00</updated><title type='text'>certificate</title><content type='html'>http://docs.codehaus.org/display/JETTY/How+to+configure+SSL&lt;br /&gt;keytool - Key and Certificate Management Tool&lt;br /&gt;Manages a keystore (database) of private keys and their associated X.509 certificate chains authenticating the corresponding public keys. Also manages certificates from trusted entities. &lt;br /&gt;SYNOPSIS&lt;br /&gt;keytool [ commands ]&lt;br /&gt;&lt;br /&gt;DESCRIPTION&lt;br /&gt;keytool is a key and certificate management utility. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. It also allows users to cache the public keys (in the form of certificates) of their communicating peers. &lt;br /&gt;A certificate is a digitally signed statement from one entity (person, company, etc.), saying that the public key (and some other information) of some other entity has a particular value. (See Certificates.) When data is digitally signed, the signature can be verified to check the data integrity and authenticity. Integrity means that the data has not been modified or tampered with, and authenticity means the data indeed comes from whoever claims to have created and signed it. &lt;br /&gt;&lt;br /&gt;keytool stores the keys and certificates in a so-called keystore. The default keystore implementation implements the keystore as a file. It protects private keys with a password. &lt;br /&gt;&lt;br /&gt;The jarsigner tool uses information from a keystore to generate or verify digital signatures for Java ARchive (JAR) files. (A JAR file packages class files, images, sounds, and/or other digital data in a single file). jarsigner verifies the digital signature of a JAR file, using the certificate that comes with it (it is included in the signature block file of the JAR file), and then checks whether or not the public key of that certificate is "trusted", i.e., is contained in the specified keystore. &lt;br /&gt;&lt;br /&gt;Please note: the keytool and jarsigner tools completely replace the javakey tool provided in JDK 1.1. These new tools provide more features than javakey, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them. The new keystore architecture replaces the identity database that javakey created and managed. It is possible to import the information from an identity database into a keystore, via the -identitydb keytool command. &lt;br /&gt;&lt;br /&gt;Keystore Entries&lt;br /&gt;There are two different types of entries in a keystore: &lt;br /&gt;key entries - each holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate "chain" for the corresponding public key. The keytool and jarsigner tools only handle the latter type of entry, that is private keys and their associated certificate chains.&lt;br /&gt;&lt;br /&gt;trusted certificate entries - each contains a single public key certificate belonging to another party. It is called a "trusted certificate" because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the "subject" (owner) of the certificate. The issuer of the certificate vouches for this, by signing the certificate. &lt;br /&gt;Keystore Aliases&lt;br /&gt;All keystore entries (key and trusted certificate entries) are accessed via unique aliases. Aliases are case-insensitive; the aliases Hugo and hugo would refer to the same keystore entry. &lt;br /&gt;&lt;br /&gt;An alias is specified when you add an entity to the keystore using the -genkey command to generate a key pair (public and private key) or the -import command to add a certificate or certificate chain to the list of trusted certificates. Subsequent keytool commands must use this same alias to refer to the entity. &lt;br /&gt;&lt;br /&gt;For example, suppose you use the alias duke to generate a new public/private key pair and wrap the public key into a self-signed certificate (see Certificate Chains) via the following command: &lt;br /&gt;&lt;br /&gt;    keytool -genkey -alias duke -keypass dukekeypasswd&lt;br /&gt;&lt;br /&gt;This specifies an inital password of "dukekeypasswd" required by subsequent commands to access the private key assocated with the alias duke. If you later want to change duke's private key password, you use a command like the following: &lt;br /&gt;    keytool -keypasswd -alias duke -keypass dukekeypasswd -new newpass&lt;br /&gt;&lt;br /&gt;This changes the password from "dukekeypasswd" to "newpass". &lt;br /&gt;Please note: A password should not actually be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you don't specify a required password option on a command line, you will be prompted for it. When typing in a password at the password prompt, the password is currently echoed (displayed exactly as typed), so be careful not to type it in front of anyone. &lt;br /&gt;&lt;br /&gt;Keystore Location&lt;br /&gt;Each keytool command has a -keystore option for specifying the name and location of the persistent keystore file for the keystore managed by keytool. The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property. On Solaris systems "user.home" defaults to the user's home directory. &lt;br /&gt;Keystore Creation&lt;br /&gt;A keystore is created whenever you use a -genkey, -import, or -identitydb command to add data to a keystore that doesn't yet exist. &lt;br /&gt;More specifically, if you specify, in the -keystore option, a keystore that doesn't yet exist, that keystore will be created. &lt;br /&gt;&lt;br /&gt;If you don't specify a -keystore option, the default keystore is a file named .keystore in your home directory. If that file does not yet exist, it will be created. &lt;br /&gt;&lt;br /&gt;Keystore Implementation&lt;br /&gt;The KeyStore class provided in the java.security package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore. &lt;br /&gt;Currently, two command-line tools (keytool and jarsigner) and a GUI-based tool named Policy Tool make use of keystore implementations. Since KeyStore is publicly available, users can write additional security applications that use it. &lt;br /&gt;&lt;br /&gt;There is a built-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password. &lt;br /&gt;&lt;br /&gt;Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that "providers" must implement. (The term "provider" refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API.) Thus, to provide a keystore implementation, clients must implement a "provider" and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider for the Java Cryptography Architecture. &lt;br /&gt;&lt;br /&gt;Applications can choose different types of keystore implementations from different providers, using the "getInstance" factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible. &lt;br /&gt;&lt;br /&gt;keytool works on any file-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The jarsigner and policytool tools, on the other hand, can read a keystore from any location that can be specified using a URL. &lt;br /&gt;&lt;br /&gt;For keytool and jarsigner, you can specify a keystore type at the command line, via the -storetype option. For Policy Tool, you can specify a keystore type via the "Change Keystore" command in the Edit menu. &lt;br /&gt;&lt;br /&gt;If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and it resides in the security properties directory, java.home/lib/security, where java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment). &lt;br /&gt;&lt;br /&gt;Each tool gets the keystore.type value and then examines all the currently-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider. &lt;br /&gt;&lt;br /&gt;The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type (as specified in the keystore.type property): &lt;br /&gt;&lt;br /&gt;    KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());&lt;br /&gt;&lt;br /&gt;The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file: &lt;br /&gt;&lt;br /&gt;    keystore.type=jks&lt;br /&gt;&lt;br /&gt;To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. &lt;br /&gt;&lt;br /&gt;For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to &lt;br /&gt;&lt;br /&gt;    keystore.type=pkcs12&lt;br /&gt;&lt;br /&gt;Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks". &lt;br /&gt;Supported Algorithms and Key Sizes&lt;br /&gt;keytool allows users to specify any key pair generation and signature algorithm supplied by any of the registered cryptographic service providers. That is, the keyalg and sigalg options for various commands must be supported by a provider implementation. The default key pair generation algorithm is "DSA". The signature algorithm is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the default signature algorithm is "SHA1withDSA", and if the underlying private key is of type "RSA", the default signature algorithm is "MD5withRSA". &lt;br /&gt;When generating a DSA key pair, the key size must be in the range from 512 to 1024 bits, and must be a multiple of 64. The default key size for any algorithm is 1024 bits. &lt;br /&gt;&lt;br /&gt;Certificates&lt;br /&gt;A certificate (also known as a public-key certificate) is a digitally signed statement from one entity (the issuer), saying that the public key (and some other information) of another entity (the subject) has some specific value. &lt;br /&gt;Let us expand on some of the key terms used in this sentence: &lt;br /&gt;&lt;br /&gt;Public Keys &lt;br /&gt;These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures. &lt;br /&gt;Digitally Signed &lt;br /&gt;If some data is digitally signed it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key. &lt;br /&gt;Identity &lt;br /&gt;A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name. &lt;br /&gt;Signature &lt;br /&gt;A signature is computed over some data using the private key of an entity (the signer, which in the case of a certificate is also known as the issuer). &lt;br /&gt;Private Keys &lt;br /&gt;These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures. &lt;br /&gt;Entity &lt;br /&gt;An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree. &lt;br /&gt;Basically, public key cryptography requires access to users' public keys. In a large-scale networked environment it is impossible to guarantee that prior relationships between communicating entities have been established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a Certification Authority (CA) can act as a trusted third party. CAs are entities (for example, businesses) that are trusted to sign (issue) certificates for other entities. It is assumed that CAs will only create valid and reliable certificates, as they are bound by legal agreements. There are many public Certification Authorities, such as VeriSign, Thawte, Entrust, and so on. You can also run your own Certification Authority using products such as the Netscape/Microsoft Certificate Servers or the Entrust CA product for your organization. &lt;br /&gt;&lt;br /&gt;Using keytool, it is possible to display, import, and export certificates. It is also possible to generate self-signed certificates. &lt;br /&gt;&lt;br /&gt;keytool currently handles X.509 certificates. &lt;br /&gt;&lt;br /&gt;X.509 Certificates&lt;br /&gt;The X.509 standard defines what information can go into a certificate, and describes how to write it down (the data format). All X.509 certificates have the following data, in addition to the signature: &lt;br /&gt;Version &lt;br /&gt;This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined. keytool can import and export v1, v2, and v3 certificates. It generates v1 certificates. &lt;br /&gt;Serial Number &lt;br /&gt;The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL). &lt;br /&gt;Signature Algorithm Identifier &lt;br /&gt;This identifies the algorithm used by the CA to sign the certificate. &lt;br /&gt;Issuer Name &lt;br /&gt;The X.500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as root or top-level CA certificates, the issuer signs its own certificate.) &lt;br /&gt;Validity Period &lt;br /&gt;Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised. &lt;br /&gt;Subject Name &lt;br /&gt;The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the X.500 Distinguished Name (DN) of the entity, for example, &lt;br /&gt;    CN=Java Duke, OU=Java Software Division, O=Sun Microsystems Inc, C=US&lt;br /&gt;&lt;br /&gt;(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.) &lt;br /&gt;Subject Public Key Information &lt;br /&gt;This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters. &lt;br /&gt;X.509 Version 1 has been available since 1988, is widely deployed, and is the most generic. &lt;br /&gt;&lt;br /&gt;X.509 Version 2 introduced the concept of subject and issuer unique identifiers to handle the possibility of reuse of subject and/or issuer names over time. Most certificate profile documents strongly recommend that names not be reused, and that certificates should not make use of unique identifiers. Version 2 certificates are not widely used. &lt;br /&gt;&lt;br /&gt;X.509 Version 3 is the most recent (1996) and supports the notion of extensions, whereby anyone can define an extension and include it in the certificate. Some common extensions in use today are: KeyUsage (limits the use of the keys to particular purposes such as "signing-only") and AlternativeNames (allows other identities to also be associated with this public key, e.g. DNS names, Email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced/used. For example, if a certificate has the KeyUsage extension marked critical and set to "keyCertSign" then if this certificate is presented during SSL communication, it should be rejected, as the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use. &lt;br /&gt;&lt;br /&gt;All the data in a certificate is encoded using two related standards called ASN.1/DER. Abstract Syntax Notation 1 describes data. The Definite Encoding Rules describe a single way to store and transfer that data. &lt;br /&gt;&lt;br /&gt;X.500 Distinguished Names&lt;br /&gt;X.500 Distinguished Names are used to identify entities, such as those which are named by the subject and issuer (signer) fields of X.509 certificates. keytool supports the following subparts: &lt;br /&gt;commonName - common name of a person, e.g., "Susan Jones"&lt;br /&gt;&lt;br /&gt;organizationUnit - small organization (e.g, department or division) name, e.g., "Purchasing"&lt;br /&gt;&lt;br /&gt;organizationName - large organization name, e.g., "ABCSystems, Inc."&lt;br /&gt;&lt;br /&gt;localityName - locality (city) name, e.g., "Palo Alto"&lt;br /&gt;&lt;br /&gt;stateName - state or province name, e.g., "California"&lt;br /&gt;&lt;br /&gt;country - two-letter country code, e.g., "CH"&lt;br /&gt;&lt;br /&gt;When supplying a distinguished name string as the value of a -dname option, as for the -genkey or -selfcert commands, the string must be in the following format: &lt;br /&gt;&lt;br /&gt;CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode&lt;br /&gt;&lt;br /&gt;where all the italicized items represent actual values and the above keywords are abbreviations for the following: &lt;br /&gt;&lt;br /&gt; CN=commonName&lt;br /&gt; OU=organizationUnit&lt;br /&gt; O=organizationName&lt;br /&gt; L=localityName&lt;br /&gt; S=stateName&lt;br /&gt; C=country&lt;br /&gt;&lt;br /&gt;A sample distinguished name string is &lt;br /&gt;&lt;br /&gt;CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US&lt;br /&gt;&lt;br /&gt;and a sample command using such a string is &lt;br /&gt;keytool -genkey -dname "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, &lt;br /&gt;S=California, C=US" -alias mark&lt;br /&gt;&lt;br /&gt;Case does not matter for the keyword abbreviations. For example, "CN", "cn", and "Cn" are all treated the same. &lt;br /&gt;&lt;br /&gt;Order matters; each subcomponent must appear in the designated order. However, it is not necessary to have all the subcomponents. You may use a subset, for example: &lt;br /&gt;&lt;br /&gt;CN=Steve Meier, OU=SunSoft, O=Sun, C=US&lt;br /&gt;&lt;br /&gt;If a distinguished name string value contains a comma, the comma must be escaped by a "\" character when you specify the string on a command line, as in &lt;br /&gt;&lt;br /&gt;   cn=peter schuster, o=Sun Microsystems\, Inc., o=sun, c=us&lt;br /&gt;&lt;br /&gt;It is never necessary to specify a distinguished name string on a command line. If it is needed for a command, but not supplied on the command line, the user is prompted for each of the subcomponents. In this case, a comma does not need to be escaped by a "\". &lt;br /&gt;&lt;br /&gt;The Internet RFC 1421 Certificate Encoding Standard&lt;br /&gt;Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as "Base 64 encoding", facilitates exporting certificates to other applications by email or through some other mechanism. &lt;br /&gt;&lt;br /&gt;Certificates read by the -import and -printcert commands can be in either this format or binary encoded. &lt;br /&gt;&lt;br /&gt;The -export command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, if the -rfc option is specified. &lt;br /&gt;&lt;br /&gt;The -list command by default prints the MD5 fingerprint of a certificate. If the -v option is specified, the certificate is printed in human-readable format, while if the -rfc option is specified, the certificate is output in the printable encoding format. &lt;br /&gt;&lt;br /&gt;In its printable encoding format, the encoded certificate is bounded at the beginning by &lt;br /&gt;&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;&lt;br /&gt;and at the end by &lt;br /&gt;&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;&lt;br /&gt;Certificate Chains&lt;br /&gt;keytool can create and manage keystore "key" entries that each contain a private key and an associated certificate "chain". The first certificate in the chain contains the public key corresponding to the private key. &lt;br /&gt;&lt;br /&gt;When keys are first generated (see the -genkey command), the chain starts off containing a single element, a self-signed certificate. A self-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the -genkey command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate. &lt;br /&gt;&lt;br /&gt;Later, after a Certificate Signing Request (CSR) has been generated (see the -certreq command) and sent to a Certification Authority (CA), the response from the CA is imported (see -import), and the self-signed certificate is replaced by a chain of certificates. At the bottom of the chain is the certificate (reply) issued by the CA authenticating the subject's public key. The next certificate in the chain is one that authenticates the CA's public key. &lt;br /&gt;&lt;br /&gt;In many cases, this is a self-signed certificate (that is, a certificate from the CA authenticating its own public key) and the last certificate in the chain. In other cases, the CA may return a chain of certificates. In this case, the bottom certificate in the chain is the same (a certificate signed by the CA, authenticating the public key of the key entry), but the second certificate in the chain is a certificate signed by a different CA, authenticating the public key of the CA you sent the CSR to. Then, the next certificate in the chain will be a certificate authenticating the second CA's key, and so on, until a self-signed "root" certificate is reached. Each certificate in the chain (after the first) thus authenticates the public key of the signer of the previous certificate in the chain. &lt;br /&gt;&lt;br /&gt;Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore. &lt;br /&gt;&lt;br /&gt;A different reply format (defined by the PKCS#7 standard) also includes the supporting certificate chain, in addition to the issued certificate. Both reply formats can be handled by keytool. &lt;br /&gt;&lt;br /&gt;The top-level (root) CA certificate is self-signed. However, the trust into the root's public key does not come from the root certificate itself (anybody could generate a self-signed certificate with the distinguished name of say, the VeriSign root CA!), but from other sources like a newspaper. The root CA public key is widely known. The only reason it is stored in a certificate is because this is the format understood by most tools, so the certificate in this case is only used as a "vehicle" to transport the root CA's public key. Before you add the root CA certificate to your keystore, you should view it (using the -printcert option) and compare the displayed fingerprint with the well-known fingerprint (obtained from a newspaper, the root CA's webpage, etc.). &lt;br /&gt;&lt;br /&gt;Importing Certificates&lt;br /&gt;To import a certificate from a file, use the -import command, as in &lt;br /&gt;&lt;br /&gt;    keytool -import -alias joe -file jcertfile.cer&lt;br /&gt;&lt;br /&gt;This sample command imports the certificate(s) in the file jcertfile.cer and stores it in the keystore entry identified by the alias joe. &lt;br /&gt;&lt;br /&gt;You import a certificate for two reasons: &lt;br /&gt;&lt;br /&gt;to add it to the list of trusted certificates, or&lt;br /&gt;&lt;br /&gt;to import a certificate reply received from a CA as the result of submitting a Certificate Signing Request (see the -certreq command) to that CA. &lt;br /&gt;Which type of import is intended is indicated by the value of the -alias option: &lt;br /&gt;&lt;br /&gt;If the alias points to a key entry, then keytool assumes you are importing a certificate reply. keytool checks whether the public key in the certificate reply matches the public key stored with the alias, and exits if they are different. &lt;br /&gt;&lt;br /&gt;If the alias does not point to a key entry, then keytool assumes you are adding a trusted certificate entry. In this case, the alias should not already exist in the keystore. If the alias does already exist, then keytool outputs an error, since there is already a trusted certificate for that alias, and does not import the certificate. If the alias does not exist in the keystore, keytool creates a trusted certificate entry with the specified alias and associates it with the imported certificate. &lt;br /&gt;WARNING Regarding Importing Trusted Certificates&lt;br /&gt;IMPORTANT: Be sure to check a certificate very carefully before importing it as a trusted certificate! &lt;br /&gt;View it first (using the -printcert command, or the -import command without the -noprompt option), and make sure that the displayed certificate fingerprint(s) match the expected ones. For example, suppose someone sends or emails you a certificate, and you put it in a file named /tmp/cert. Before you consider adding the certificate to your list of trusted certificates, you can execute a -printcert command to view its fingerprints, as in &lt;br /&gt;&lt;br /&gt;  keytool -printcert -file /tmp/cert&lt;br /&gt;    Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll&lt;br /&gt;    Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll&lt;br /&gt;    Serial Number: 59092b34&lt;br /&gt;    Valid from: Thu Sep 25 18:01:13 PDT 1997 until: Wed Dec 24 17:01:13 PST 1997&lt;br /&gt;    Certificate Fingerprints:&lt;br /&gt;         MD5:  11:81:AD:92:C8:E5:0E:A2:01:2E:D4:7A:D7:5F:07:6F&lt;br /&gt;         SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE&lt;br /&gt;&lt;br /&gt;Then call or otherwise contact the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show. Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed (for example, a JAR file with malicious class files inside). &lt;br /&gt;Note: it is not required that you execute a -printcert command prior to importing a certificate, since before adding a certificate to the list of trusted certificates in the keystore, the -import command prints out the certificate information and prompts you to verify it. You then have the option of aborting the import operation. Note, however, this is only the case if you invoke the -import command without the -noprompt option. If the -noprompt option is given, there is no interaction with the user. &lt;br /&gt;&lt;br /&gt;Exporting Certificates&lt;br /&gt;To export a certificate to a file, use the -export command, as in &lt;br /&gt;&lt;br /&gt;    keytool -export -alias jane -file janecertfile.cer&lt;br /&gt;&lt;br /&gt;This sample command exports jane's certificate to the file janecertfile.cer. That is, if jane is the alias for a key entry, the command exports the certificate at the bottom of the certificate chain in that keystore entry. This is the certificate that authenticates jane's public key. &lt;br /&gt;If, instead, jane is the alias for a trusted certificate entry, then that trusted certificate is exported. &lt;br /&gt;&lt;br /&gt;Displaying Certificates&lt;br /&gt;To print out the contents of a keystore entry, use the -list command, as in &lt;br /&gt;&lt;br /&gt;    keytool -list -alias joe&lt;br /&gt;&lt;br /&gt;If you don't specify an alias, as in &lt;br /&gt;    keytool -list&lt;br /&gt;&lt;br /&gt;the contents of the entire keystore are printed. &lt;br /&gt;To display the contents of a certificate stored in a file, use the -printcert command, as in &lt;br /&gt;&lt;br /&gt;    keytool -printcert -file certfile.cer&lt;br /&gt;&lt;br /&gt;This displays information about the certificate stored in the file certfile.cer. &lt;br /&gt;&lt;br /&gt;Note: This works independently of a keystore, i.e., you do not need a keystore in order to display a certificate that's stored in a file. &lt;br /&gt;&lt;br /&gt;Generating a self-signed certificate&lt;br /&gt;A self-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the -genkey command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate. &lt;br /&gt;&lt;br /&gt;You may occasionally wish to generate a new self-signed certificate. For example, you may want to use the same key pair under a different identity (distinguished name). For example, suppose you change departments. You can then: &lt;br /&gt;&lt;br /&gt;copy (clone) the original key entry. See -keyclone.&lt;br /&gt;&lt;br /&gt;generate a new self-signed certificate for the cloned entry, using your new distinguished name. See below.&lt;br /&gt;&lt;br /&gt;generate a Certificate Signing Requests for the cloned entry, and import the reply certificate or certificate chain. See the -certreq and -import commands.&lt;br /&gt;&lt;br /&gt;delete the original (now obsolete) entry. See -delete.&lt;br /&gt;&lt;br /&gt;To generate a self-signed certificate, use the -selfcert command, as in &lt;br /&gt;    keytool -selfcert -alias dukeNew -keypass b92kqmp&lt;br /&gt;      -dname "cn=Duke Smith, ou=Purchasing, o=BlueSoft, c=US"&lt;br /&gt;&lt;br /&gt;The generated certificate is stored as a single-element certificate chain in the keystore entry identified by the specified alias (in this case "dukeNew"), where it replaces the existing certificate chain. &lt;br /&gt;COMMAND AND OPTION NOTES&lt;br /&gt;The various commands and their options are listed and described below . Note: &lt;br /&gt;&lt;br /&gt;All command and option names are preceded by a minus sign (-).&lt;br /&gt;&lt;br /&gt;The options for each command may be provided in any order.&lt;br /&gt;&lt;br /&gt;All items not italicized or in braces or square brackets are required to appear as is.&lt;br /&gt;&lt;br /&gt;Braces surrounding an option generally signify that a default value will be used if the option is not specified on the command line. Braces are also used around the -v, -rfc, and -J options, which only have meaning if they appear on the command line (that is, they don't have any "default" values other than not existing).&lt;br /&gt;&lt;br /&gt;Brackets surrounding an option signify that the user is prompted for the value(s) if the option is not specified on the command line. (For a -keypass option, if you do not specify the option on the command line, keytool will first attempt to use the keystore password to recover the private key, and if this fails, will then prompt you for the private key password.)&lt;br /&gt;&lt;br /&gt;Items in italics (option values) represent the actual values that must be supplied. For example, here is the format of the -printcert command: &lt;br /&gt;  keytool -printcert {-file cert_file} {-v}&lt;br /&gt;&lt;br /&gt;When specifying a -printcert command, replace cert_file with the actual file name, as in: &lt;br /&gt;&lt;br /&gt;  keytool -printcert -file VScert.cer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Option values must be quoted if they contain a blank (space).&lt;br /&gt;&lt;br /&gt;The -help command is the default. Thus, the command line &lt;br /&gt;  keytool&lt;br /&gt;&lt;br /&gt;is equivalent to &lt;br /&gt;  keytool -help&lt;br /&gt;&lt;br /&gt;Option Defaults&lt;br /&gt;Below are the defaults for various option values. &lt;br /&gt;-alias "mykey"&lt;br /&gt;&lt;br /&gt;-keyalg "DSA"&lt;br /&gt;&lt;br /&gt;-keysize 1024&lt;br /&gt;&lt;br /&gt;-validity 90&lt;br /&gt;&lt;br /&gt;-keystore the file named .keystore in the user's home directory&lt;br /&gt;&lt;br /&gt;-file stdin if reading, stdout if writing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The signature algorithm (-sigalg option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the -sigalg option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", -sigalg defaults to "MD5withRSA". &lt;br /&gt;Options that Appear for Most Commands&lt;br /&gt;The -v option can appear for all commands except -help. If it appears, it signifies "verbose" mode; detailed certificate information will be output. &lt;br /&gt;There is also a -Jjavaoption option that may appear for any command. If it appears, the specified javaoption string is passed through directly to the Java interpreter. (keytool is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line. &lt;br /&gt;&lt;br /&gt;These options may appear for all commands operating on a keystore: &lt;br /&gt;&lt;br /&gt;-storetype storetype &lt;br /&gt;This qualifier specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static getDefaultType method in java.security.KeyStore. &lt;br /&gt;&lt;br /&gt;-keystore keystore &lt;br /&gt;The keystore (database file) location. Defaults to the file .keystore in the user's home directory, as determined by the "user.home" system property. On Solaris systems "user.home" defaults to the user's home directory. &lt;br /&gt;&lt;br /&gt;-storepass storepass &lt;br /&gt;The password which is used to protect the integrity of the keystore. &lt;br /&gt;storepass must be at least 6 characters long. It must be provided to all commands that access the keystore contents. For such commands, if a -storepass option is not provided at the command line, the user is prompted for it. &lt;br /&gt;&lt;br /&gt;When retrieving information from the keystore, the password is optional; if no password is given, the integrity of the retrieved information cannot be checked and a warning is displayed. &lt;br /&gt;&lt;br /&gt;Be careful with passwords - see Warning Regarding Passwords. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-provider provider-class-name &lt;br /&gt;Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file.&lt;br /&gt;&lt;br /&gt;Warning Regarding Passwords&lt;br /&gt;Most commands operating on a keystore require the store password. Some commands require a private key password. &lt;br /&gt;&lt;br /&gt;Passwords can be specified on the command line (in the -storepass and -keypass options, respectively). However, a password should not be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. &lt;br /&gt;&lt;br /&gt;If you don't specify a required password option on a command line, you will be prompted for it. When typing in a password at the password prompt, the password is currently echoed (displayed exactly as typed), so be careful not to type it in front of anyone. &lt;br /&gt;&lt;br /&gt;COMMANDS&lt;br /&gt;See also the Command and Option Notes. &lt;br /&gt;Adding Data to the Keystore&lt;br /&gt;-genkey {-alias alias} {-keyalg keyalg} {-keysize keysize} {-sigalg sigalg} [-dname dname] [-keypass keypass] {-validity valDays} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v1 self-signed certificate, which is stored as a single-element certificate chain. This certificate chain and the private key are stored in a new keystore entry identified by alias. &lt;br /&gt;&lt;br /&gt;keyalg specifies the algorithm to be used to generate the key pair, and keysize specifies the size of each key to be generated. sigalg specifies the algorithm that should be used to sign the self-signed certificate; this algorithm must be compatible with keyalg. See Supported Algorithms and Key Sizes. &lt;br /&gt;&lt;br /&gt;dname specifies the X.500 Distinguished Name to be associated with alias, and is used as the issuer and subject fields in the self-signed certificate. If no distinguished name is provided at the command line, the user will be prompted for one. &lt;br /&gt;&lt;br /&gt;keypass is a password used to protect the private key of the generated key pair. If no password is provided, the user is prompted for it. If you press RETURN at the prompt, the key password is set to the same password as that used for the keystore. keypass must be at least 6 characters long. Be careful with passwords - see Warning Regarding Passwords. &lt;br /&gt;&lt;br /&gt;valDays tells the number of days for which the certificate should be considered valid.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-import {-alias alias} {-file cert_file} [-keypass keypass] {-noprompt} {-trustcacerts} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Reads the certificate or certificate chain (where the latter is supplied in a PKCS#7 formatted reply) from the file cert_file, and stores it in the keystore entry identified by alias. If no file is given, the certificate or PKCS#7 reply is read from stdin. &lt;br /&gt;&lt;br /&gt;keytool can import X.509 v1, v2, and v3 certificates, and PKCS#7 formatted certificate chains consisting of certificates of that type. The data to be imported must be provided either in binary encoding format, or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. In the latter case, the encoding must be bounded at the beginning by a string that starts with "-----BEGIN", and bounded at the end by a string that starts with "-----END". &lt;br /&gt;&lt;br /&gt;You import a certificate for two reasons: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to add it to the list of trusted certificates, or&lt;br /&gt;&lt;br /&gt;to import a certificate reply received from a CA as the result of submitting a Certificate Signing Request (see the -certreq command) to that CA. &lt;br /&gt;Importing a New Trusted Certificate&lt;br /&gt;When importing a new trusted certificate, alias must not yet exist in the keystore. Before adding the certificate to the keystore, keytool tries to verify it by attempting to construct a chain of trust from that certificate to a self-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore. &lt;br /&gt;&lt;br /&gt;If the -trustcacerts option has been specified, additional certificates are considered for the chain of trust, namely the certificates in a file named "cacerts". &lt;br /&gt;&lt;br /&gt;If keytool fails to establish a trust path from the certificate to be imported up to a self-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner himself/herself. Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! -- see WARNING Regarding Importing Trusted Certificates. The user then has the option of aborting the import operation. If the -noprompt option is given, however, there will be no interaction with the user. &lt;br /&gt;&lt;br /&gt;Importing a Certificate Reply&lt;br /&gt;When importing a certificate reply, the certificate reply is validated using trusted certificates from the keystore, and optionally using the certificates configured in the "cacerts" keystore file (if the -trustcacerts option was specified). &lt;br /&gt;&lt;br /&gt;The methods of determining whether the certificate reply is trusted are described in the following: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If the reply is a single X.509 certificate, keytool attempts to establish a trust chain, starting at the certificate reply and ending at a self-signed certificate (belonging to a root CA). The certificate reply and the hierarchy of certificates used to authenticate the certificate reply form the new certificate chain of alias. If a trust chain cannot be established, the certificate reply is not imported. In this case, keytool does not print out the certificate and prompt the user to verify it, because it is very hard (if not impossible) for a user to determine the authenticity of the certificate reply. &lt;br /&gt;&lt;br /&gt;If the reply is a PKCS#7 formatted certificate chain, the chain is first ordered (with the user certificate first and the self-signed root CA certificate last), before keytool attempts to match the root CA certificate provided in the reply with any of the trusted certificates in the keystore or the "cacerts" keystore file (if the -trustcacerts option was specified). If no match can be found, the information of the root CA certificate is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the root CA itself. The user then has the option of aborting the import operation. If the -noprompt option is given, however, there will be no interaction with the user. &lt;br /&gt;The new certificate chain of alias replaces the old certificate chain associated with this entry. The old chain can only be replaced if a valid keypass, the password used to protect the private key of the entry, is supplied. If no password is provided, and the private key password is different from the keystore password, the user is prompted for it. Be careful with passwords - see Warning Regarding Passwords. &lt;br /&gt;&lt;br /&gt;The cacerts Certificates File&lt;br /&gt;A certificates file named "cacerts" resides in the security properties directory, java.home/lib/security, where java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment). &lt;br /&gt;&lt;br /&gt;The "cacerts" file represents a system-wide keystore with CA certificates. System administrators can configure and manage that file using keytool, specifying "jks" as the keystore type. The "cacerts" keystore file ships with several root CA certificates with the following aliases and X.500 owner distinguished names: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Alias: thawtepersonalfreemailca &lt;br /&gt;Owner DN: EmailAddress=personal-freemail@thawte.com, &lt;br /&gt;CN=Thawte Personal Freemail CA, &lt;br /&gt;OU=Certification Services Division, &lt;br /&gt;O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA &lt;br /&gt;&lt;br /&gt;Alias: thawtepersonalbasicca &lt;br /&gt;Owner DN: EmailAddress=personal-basic@thawte.com, &lt;br /&gt;CN=Thawte Personal Basic CA, &lt;br /&gt;OU=Certification Services Division, &lt;br /&gt;O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA &lt;br /&gt;&lt;br /&gt;Alias: thawtepersonalpremiumca &lt;br /&gt;Owner DN: EmailAddress=personal-premium@thawte.com, &lt;br /&gt;CN=Thawte Personal Premium CA, &lt;br /&gt;OU=Certification Services Division, &lt;br /&gt;O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA &lt;br /&gt;&lt;br /&gt;Alias: thawteserverca &lt;br /&gt;Owner DN: EmailAddress=server-certs@thawte.com, &lt;br /&gt;CN=Thawte Server CA, OU=Certification Services Division, &lt;br /&gt;O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA &lt;br /&gt;&lt;br /&gt;Alias: thawtepremiumserverca &lt;br /&gt;Owner DN: EmailAddress=premium-server@thawte.com, &lt;br /&gt;CN=Thawte Premium Server CA, &lt;br /&gt;OU=Certification Services Division, &lt;br /&gt;O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA &lt;br /&gt;&lt;br /&gt;Alias: verisignclass1ca &lt;br /&gt;Owner DN: OU=Class 1 Public Primary Certification Authority, &lt;br /&gt;O="VeriSign, Inc.", C=US &lt;br /&gt;&lt;br /&gt;Alias: verisignclass2ca&lt;br /&gt;Owner DN: OU=Class 2 Public Primary Certification Authority, &lt;br /&gt;O="VeriSign, Inc.", C=US &lt;br /&gt;&lt;br /&gt;Alias: verisignclass3ca &lt;br /&gt;Owner DN: OU=Class 3 Public Primary Certification Authority, &lt;br /&gt;O="VeriSign, Inc.", C=US &lt;br /&gt;&lt;br /&gt;Alias: verisignclass4ca &lt;br /&gt;Owner DN: OU=Class 4 Public Primary Certification Authority, &lt;br /&gt;O="VeriSign, Inc.", C=US &lt;br /&gt;&lt;br /&gt;Alias: verisignserverca &lt;br /&gt;Owner DN: OU=Secure Server Certification Authority, &lt;br /&gt;O="RSA Data Security, Inc.", C=US &lt;br /&gt;&lt;br /&gt;Alias: baltimorecodesigningca &lt;br /&gt;Owner DN: CN=Baltimore CyberTrust Code Signing Root, &lt;br /&gt;OU=CyberTrust, O=Baltimore, C=IE &lt;br /&gt;&lt;br /&gt;Alias: gtecybertrustglobalca &lt;br /&gt;Owner DN: CN=GTE CyberTrust Global Root, &lt;br /&gt;OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US &lt;br /&gt;&lt;br /&gt;Alias: baltimorecybertrustca &lt;br /&gt;Owner DN: CN=Baltimore CyberTrust Root, &lt;br /&gt;OU=CyberTrust, O=Baltimore, C=IE &lt;br /&gt;&lt;br /&gt;Alias: gtecybertrustca &lt;br /&gt;Owner DN: CN=GTE CyberTrust Root, &lt;br /&gt;O=GTE Corporation, C=US &lt;br /&gt;&lt;br /&gt;Alias: gtecybertrust5ca &lt;br /&gt;Owner DN: CN=GTE CyberTrust Root 5, &lt;br /&gt;OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US &lt;br /&gt;The initial password of the "cacerts" keystore file is "changeit". System administrators should change that password and the default access permission of that file upon installing the SDK. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;IMPORTANT: Verify Your cacerts File &lt;br /&gt;Since you trust the CAs in the cacerts file as entities for signing and issuing certificates to other entities, you must manage the cacerts file carefully. The cacerts file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates bundled in the cacerts file and make your own trust decisions. To remove an untrusted CA certificate from the cacerts file, use the delete option of the keytool command. You can find the cacerts file in the JRE installation directory. Contact your system administrator if you do not have permission to edit this file. &lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-selfcert {-alias alias} {-sigalg sigalg} {-dname dname} {-validity valDays} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Generates an X.509 v1 self-signed certificate, using keystore information including the private key and public key associated with alias. If dname is supplied at the command line, it is used as the X.500 Distinguished Name for both the issuer and subject of the certificate. Otherwise, the X.500 Distinguished Name associated with alias (at the bottom of its existing certificate chain) is used. &lt;br /&gt;&lt;br /&gt;The generated certificate is stored as a single-element certificate chain in the keystore entry identified by alias, where it replaces the existing certificate chain. &lt;br /&gt;&lt;br /&gt;sigalg specifies the algorithm that should be used to sign the certificate. See Supported Algorithms and Key Sizes. &lt;br /&gt;&lt;br /&gt;In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If keypass is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it. Be careful with passwords - see Warning Regarding Passwords. &lt;br /&gt;&lt;br /&gt;valDays tells the number of days for which the certificate should be considered valid.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-identitydb {-file idb_file} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Reads the JDK 1.1.x-style identity database from the file idb_file, and adds its entries to the keystore. If no file is given, the identity database is read from stdin. If a keystore does not exist, it is created. &lt;br /&gt;&lt;br /&gt;Only identity database entries ("identities") that were marked as trusted will be imported in the keystore. All other identities will be ignored. For each trusted identity, a keystore entry will be created. The identity's name is used as the "alias" for the keystore entry. &lt;br /&gt;&lt;br /&gt;The private keys from trusted identities will all be encrypted under the same password, storepass. This is the same password that is used to protect the keystore's integrity. Users can later assign individual passwords to those private keys by using the "-keypasswd" keytool command option. &lt;br /&gt;&lt;br /&gt;An identity in an identity database may hold more than one certificate, each certifying the same public key. But a keystore key entry for a private key has that private key and a single "certificate chain" (initially just a single certificate), where the first certificate in the chain contains the public key corresponding to the private key. When importing the information from an identity, only the first certificate of the identity is stored in the keystore. This is because an identity's name in an identity database is used as the alias for its corresponding keystore entry, and alias names are unique within a keystore, &lt;br /&gt;&lt;br /&gt;Exporting Data&lt;br /&gt;-certreq {-alias alias} {-sigalg sigalg} {-file certreq_file} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Generates a Certificate Signing Request (CSR), using the PKCS#10 format. &lt;br /&gt;&lt;br /&gt;A CSR is intended to be sent to a certificate authority (CA). The CA will authenticate the certificate requestor (usually off-line) and will return a certificate or certificate chain, used to replace the existing certificate chain (which initially consists of a self-signed certificate) in the keystore. &lt;br /&gt;&lt;br /&gt;The private key and X.500 Distinguished Name associated with alias are used to create the PKCS#10 certificate request. In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If keypass is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it.&lt;br /&gt;&lt;br /&gt;Be careful with passwords - see Warning Regarding Passwords. &lt;br /&gt;&lt;br /&gt;sigalg specifies the algorithm that should be used to sign the CSR. See Supported Algorithms and Key Sizes. &lt;br /&gt;&lt;br /&gt;The CSR is stored in the file certreq_file. If no file is given, the CSR is output to stdout. &lt;br /&gt;&lt;br /&gt;Use the import command to import the response from the CA.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-export {-alias alias} {-file cert_file} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-rfc} {-v} {-Jjavaoption} &lt;br /&gt;Reads (from the keystore) the certificate associated with alias, and stores it in the file cert_file. &lt;br /&gt;&lt;br /&gt;If no file is given, the certificate is output to stdout. &lt;br /&gt;&lt;br /&gt;The certificate is by default output in binary encoding, but will instead be output in the printable encoding format, as defined by the Internet RFC 1421 standard, if the -rfc option is specified. &lt;br /&gt;&lt;br /&gt;If alias refers to a trusted certificate, that certificate is output. Otherwise, alias refers to a key entry with an associated certificate chain. In that case, the first certificate in the chain is returned. This certificate authenticates the public key of the entity addressed by alias.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Displaying Data&lt;br /&gt;-list {-alias alias} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v | -rfc} {-Jjavaoption} &lt;br /&gt;Prints (to stdout) the contents of the keystore entry identified by alias. If no alias is specified, the contents of the entire keystore are printed. &lt;br /&gt;&lt;br /&gt;This command by default prints the MD5 fingerprint of a certificate. If the -v option is specified, the certificate is printed in human-readable format, with additional information such as the owner, issuer, and serial number. If the -rfc option is specified, certificate contents are printed using the printable encoding format, as defined by the Internet RFC 1421 standard &lt;br /&gt;&lt;br /&gt;You cannot specify both -v and -rfc. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-printcert {-file cert_file} {-v} {-Jjavaoption} &lt;br /&gt;Reads the certificate from the file cert_file, and prints its contents in a human-readable format. If no file is given, the certificate is read from stdin. &lt;br /&gt;&lt;br /&gt;The certificate may be either binary encoded or in printable encoding format, as defined by the Internet RFC 1421 standard. &lt;br /&gt;&lt;br /&gt;Note: This option can be used independently of a keystore.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Managing the Keystore&lt;br /&gt;-keyclone {-alias alias} [-dest dest_alias] [-keypass keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Creates a new keystore entry, which has the same private key and certificate chain as the original entry. &lt;br /&gt;&lt;br /&gt;The original entry is identified by alias (which defaults to "mykey" if not provided). The new (destination) entry is identified by dest_alias. If no destination alias is supplied at the command line, the user is prompted for it. &lt;br /&gt;&lt;br /&gt;If the private key password is different from the keystore password, then the entry will only be cloned if a valid keypass is supplied. This is the password used to protect the private key associated with alias. If no key password is supplied at the command line, and the private key password is different from the keystore password, the user is prompted for it. The private key in the cloned entry may be protected with a different password, if desired. If no -new option is supplied at the command line, the user is prompted for the new entry's password (and may choose to let it be the same as for the cloned entry's private key). &lt;br /&gt;&lt;br /&gt;Be careful with passwords - see Warning Regarding Passwords. &lt;br /&gt;&lt;br /&gt;This command can be used to establish multiple certificate chains corresponding to a given key pair, or for backup purposes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-storepasswd [-new new_storepass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Changes the password used to protect the integrity of the keystore contents. The new password is new_storepass, which must be at least 6 characters long.&lt;br /&gt;&lt;br /&gt;Be careful with passwords - see Warning Regarding Passwords.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-keypasswd {-alias alias} [-keypass old_keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Changes the password under which the private key identified by alias is protected, from old_keypass to new_keypass. &lt;br /&gt;&lt;br /&gt;If the -keypass option is not provided at the command line, and the private key password is different from the keystore password, the user is prompted for it. &lt;br /&gt;&lt;br /&gt;If the -new option is not provided at the command line, the user is prompted for it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Be careful with passwords - see Warning Regarding Passwords.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-delete [-alias alias] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption} &lt;br /&gt;Deletes from the keystore the entry identified by alias. The user is prompted for the alias, if no alias is provided at the command line.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Getting Help&lt;br /&gt;-help &lt;br /&gt;Lists all the commands and their options.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;EXAMPLES&lt;br /&gt;Suppose you want to create a keystore for managing your public/private key pair and certificates from entities you trust. &lt;br /&gt;&lt;br /&gt;Generating Your Key Pair&lt;br /&gt;The first thing you need to do is create a keystore and generate the key pair. You could use a command such as the following: &lt;br /&gt;&lt;br /&gt;    keytool -genkey -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" &lt;br /&gt;      -alias business -keypass kpi135 -keystore /working/mykeystore &lt;br /&gt;      -storepass ab987c -validity 180&lt;br /&gt;&lt;br /&gt;(Please note: This must be typed as a single line. Multiple lines are used in the examples just for legibility purposes.) &lt;br /&gt;&lt;br /&gt;This command creates the keystore named "mykeystore" in the "working" directory (assuming it doesn't already exist), and assigns it the password "ab987c". It generates a public/private key pair for the entity whose "distinguished name" has a common name of "Mark Jones", organizational unit of "JavaSoft", organization of "Sun" and two-letter country code of "US". It uses the default "DSA" key generation algorithm to create the keys, both 1024 bits long. &lt;br /&gt;&lt;br /&gt;It creates a self-signed certificate (using the default "SHA1withDSA" signature algorithm) that includes the public key and the distinguished name information. This certificate will be valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias "business". The private key is assigned the password "kpi135". &lt;br /&gt;&lt;br /&gt;The command could be significantly shorter if option defaults were accepted. As a matter of fact, no options are required; defaults are used for unspecified options that have default values, and you are prompted for any required values. Thus, you could simply have the following: &lt;br /&gt;&lt;br /&gt;    keytool -genkey &lt;br /&gt;&lt;br /&gt;In this case, a keystore entry with alias "mykey" is created, with a newly-generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named ".keystore" in your home directory. (The keystore is created if it doesn't already exist.) You will be prompted for the distinguished name information, the keystore password, and the private key password. &lt;br /&gt;The rest of the examples assume you executed the -genkey command without options specified, and that you responded to the prompts with values equal to those given in the first -genkey command, above (a private key password of "kpi135", etc.) &lt;br /&gt;&lt;br /&gt;Requesting a Signed Certificate from a Certification Authority&lt;br /&gt;So far all we've got is a self-signed certificate. A certificate is more likely to be trusted by others if it is signed by a Certification Authority (CA). To get such a signature, you first generate a Certificate Signing Request (CSR), via the following: &lt;br /&gt;&lt;br /&gt;    keytool -certreq -file MarkJ.csr&lt;br /&gt;&lt;br /&gt;This creates a CSR (for the entity identified by the default alias "mykey") and puts the request in the file named "MarkJ.csr". Submit this file to a CA, such as VeriSign, Inc. The CA will authenticate you, the requestor (usually off-line), and then will return a certificate, signed by them, authenticating your public key. (In some cases, they will actually return a chain of certificates, each one authenticating the public key of the signer of the previous certificate in the chain.) &lt;br /&gt;Importing a Certificate for the CA&lt;br /&gt;You need to replace your self-signed certificate with a certificate chain, where each certificate in the chain authenticates the public key of the signer of the previous certificate in the chain, up to a "root" CA. &lt;br /&gt;&lt;br /&gt;Before you import the certificate reply from a CA, you need one or more "trusted certificates" in your keystore or in the cacerts keystore file (which is described in import command): &lt;br /&gt;&lt;br /&gt;If the certificate reply is a certificate chain, you just need the top certificate of the chain (that is, the "root" CA certificate authenticating that CA's public key).&lt;br /&gt;&lt;br /&gt;If the certificate reply is a single certificate, you need a certificate for the issuing CA (the one that signed it), and if that certificate is not self-signed, you need a certificate for its signer, and so on, up to a self-signed "root" CA certificate. &lt;br /&gt;The "cacerts" keystore file ships with five VeriSign root CA certificates, so you probably won't need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key hasn't been added to "cacerts", you will need to import a certificate from the CA as a "trusted certificate". &lt;br /&gt;&lt;br /&gt;A certificate from a CA is usually either self-signed, or signed by another CA (in which case you also need a certificate authenticating that CA's public key). Suppose company ABC, Inc., is a CA, and you obtain a file named "ABCCA.cer" that is purportedly a self-signed certificate from ABC, authenticating that CA's public key. &lt;br /&gt;&lt;br /&gt;Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! View it first (using the keytool -printcert command, or the keytool -import command without the -noprompt option), and make sure that the displayed certificate fingerprint(s) match the expected ones. You can call the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show (or that a secure public key repository shows). Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed. &lt;br /&gt;&lt;br /&gt;If you trust that the certificate is valid, then you can add it to your keystore via the following: &lt;br /&gt;&lt;br /&gt;    keytool -import -alias abc -file ABCCA.cer&lt;br /&gt;&lt;br /&gt;This creates a "trusted certificate" entry in the keystore, with the data from the file "ABCCA.cer", and assigns the alias "abc" to the entry. &lt;br /&gt;Importing the Certificate Reply from the CA&lt;br /&gt;Once you've imported a certificate authenticating the public key of the CA you submitted your certificate signing request to (or there's already such a certificate in the "cacerts" file), you can import the certificate reply and thereby replace your self-signed certificate with a certificate chain. This chain is the one returned by the CA in response to your request (if the CA reply is a chain), or one constructed (if the CA reply is a single certificate) using the certificate reply and trusted certificates that are already available in the keystore where you import the reply or in the "cacerts" keystore file. &lt;br /&gt;&lt;br /&gt;For example, suppose you sent your certificate signing request to VeriSign. You can then import the reply via the following, which assumes the returned certificate is named "VSMarkJ.cer": &lt;br /&gt;&lt;br /&gt;    keytool -import -trustcacerts -file VSMarkJ.cer&lt;br /&gt;&lt;br /&gt;Exporting a Certificate Authenticating Your Public Key&lt;br /&gt;Suppose you have used the jarsigner tool to sign a Java ARchive (JAR) file. Clients that want to use the file will want to authenticate your signature. &lt;br /&gt;One way they can do this is by first importing your public key certificate into their keystore as a "trusted" entry. You can export the certificate and supply it to your clients. As an example, you can copy your certificate to a file named MJ.cer via the following, assuming the entry is aliased by "mykey": &lt;br /&gt;&lt;br /&gt;    keytool -export -alias mykey -file MJ.cer&lt;br /&gt;&lt;br /&gt;Given that certificate, and the signed JAR file, a client can use the jarsigner tool to authenticate your signature. &lt;br /&gt;Changing Your Distinguished Name but Keeping your Key Pair&lt;br /&gt;Suppose your distinguished name changes, for example because you have changed departments or moved to a different city. If desired, you may still use the public/private key pair you've previously used, and yet update your distinguished name. For example, suppose your name is Susan Miller, and you created your initial key entry with the alias sMiller and the distinguished name &lt;br /&gt;  "cn=Susan Miller, ou=Finance Department, o=BlueSoft, c=us"&lt;br /&gt;&lt;br /&gt;Suppose you change from the Finance Department to the Accounting Department. You can still use the previously-generated public/private key pair and yet update your distinguished name by doing the following. First, copy (clone) your key entry: &lt;br /&gt;    keytool -keyclone -alias sMiller -dest sMillerNew&lt;br /&gt;&lt;br /&gt;(This prompts for the store password and for the initial and destination private key passwords, since they aren't provided at the command line.) Now you need to change the certificate chain associated with the copy, so that the first certificate in the chain uses your different distinguished name. Start by generating a self-signed certificate with the appropriate name: &lt;br /&gt;    keytool -selfcert -alias sMillerNew&lt;br /&gt;      -dname "cn=Susan Miller, ou=Accounting Department, o=BlueSoft, c=us"&lt;br /&gt;&lt;br /&gt;Then generate a Certificate Signing Request based on the information in this new certificate: &lt;br /&gt;&lt;br /&gt;    keytool -certreq -alias sMillerNew&lt;br /&gt;&lt;br /&gt;When you get the CA certificate reply, import it: &lt;br /&gt;    keytool -import -alias sMillerNew -file VSSMillerNew.cer&lt;br /&gt;&lt;br /&gt;After importing the certificate reply, you may want to remove the initial key entry that used your old distinguished name: &lt;br /&gt;    keytool -delete -alias sMiller&lt;br /&gt;&lt;br /&gt;SEE ALSO&lt;br /&gt;jar tool documentation&lt;br /&gt;&lt;br /&gt;jarsigner tool documentation&lt;br /&gt;&lt;br /&gt;the Security trail of the Java Tutorial for examples of the use of keytool &lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Copyright 1994-2004 Sun Microsystems, Inc.&lt;br /&gt;  &lt;br /&gt;Java Software  &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;How to configure SSL&lt;br /&gt;This is an overview of how to configure SSL for Jetty, which uses Sun's reference implementation for the Java Secure Sockets Extension (JSSE).&lt;br /&gt;&lt;br /&gt;Configuring SSL can be a confusing experience of keys, certificates, protocols and formats, thus it helps to have a reasonable understanding&lt;br /&gt;of the basics. The following links provide some good starting points:&lt;br /&gt;&lt;br /&gt;Certificates: &lt;br /&gt;SSL Certificates HOWTO &lt;br /&gt;Mindprod Java Glossary definition&lt;br /&gt;*Keytool: &lt;br /&gt;Keytool for Unix &lt;br /&gt;Keytool for Windows &lt;br /&gt;Other tools: &lt;br /&gt;IBM Keyman &lt;br /&gt;Open SSL: &lt;br /&gt;Mindprod Java Glossary definition &lt;br /&gt;FAQ &lt;br /&gt;The Basics&lt;br /&gt;The following steps are required to configure Jetty for SSL:&lt;br /&gt;Step 1: Generate or obtain a public/private key pair and x509 certificate.&lt;br /&gt;Step 2: Optionally obtain a certificate from a known certificate authority.&lt;br /&gt;Step 3: Load the keys and the certificates into a JSSE Keystore.&lt;br /&gt;Step 4: Configure a JsseListener with the location and passwords for the keystore.&lt;br /&gt;&lt;br /&gt;OpenSSL Versus Keytool&lt;br /&gt;For testing, keytool is probably the simplest way to generate the key and certificate you will need. However, IBMs keyman is also pretty good and provides a GUI rather than a command line.&lt;br /&gt;&lt;br /&gt;The OpenSSL tools can also be used to generate keys and certificates or to convert ones that have been used with Apache or other servers.&lt;br /&gt;The OpenSSL tool suite is commonly used by other servers such as Apache to generate manipulate keys and certificates. So you may already have some keys and certificates created by openssl, or openssl may be more trusted than keytool or some certificate authorities for step 2 may also prefer the formats produced by ssl.&lt;br /&gt;&lt;br /&gt;If you want the option of using the same certificate with Jetty or a web server such as Apache not written in Java, you may prefer to&lt;br /&gt;generate your private key and certificate with openSSL. The Java keytool does not provide options for exporting private keys, and Apache&lt;br /&gt;needs the private key. If you create the key and certificate with openSSL your non-Java web server will have ready access to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 1: Keys and Certificates&lt;br /&gt;The simplest way generate keys and certificates is to use the keytool application that comes with the JDK, as it generates keys and certificates directly into the keystore. See Step 1a.&lt;br /&gt;&lt;br /&gt;If you already have keys and certificates, please goto Step 3 to load them into a JSSE key store.&lt;br /&gt;&lt;br /&gt;If you have a renewal certificate to replace one that is expiring, take a look at [Renewing Certificates#renewals].&lt;br /&gt;&lt;br /&gt;The commands below only generate minimal keys and certificates. You should read the full manuals of the tools you are using if you wish to specify:&lt;br /&gt;&lt;br /&gt;Key size. &lt;br /&gt;Certificate expiry. &lt;br /&gt;Alternate security providers. &lt;br /&gt;&lt;br /&gt;Step 1a: Generating a certificate with JDK keytool&lt;br /&gt;The following command will generate a key pair and certificate directly into a keystore:&lt;br /&gt;&lt;br /&gt;keytool -keystore keystore -alias jetty -genkey -keyalg RSA&lt;br /&gt;This command will prompt for information about the certificate and for passwords to protect both the keystore and the keys within it. The only mandatory response is to provide the fully qualified host name of the server at the "first and last name" prompt. For example:&lt;br /&gt;&lt;br /&gt;keytool -keystore keystore -alias jetty -genkey -keyalg RSA&lt;br /&gt;Enter keystore password:  password&lt;br /&gt;What is your first and last name?&lt;br /&gt;  [Unknown]:  jetty.mortbay.org&lt;br /&gt;What is the name of your organizational unit?&lt;br /&gt;  [Unknown]:  Jetty&lt;br /&gt;What is the name of your organization?&lt;br /&gt;  [Unknown]:  Mort Bay Consulting Pty. Ltd.&lt;br /&gt;What is the name of your City or Locality?&lt;br /&gt;  [Unknown]:&lt;br /&gt;What is the name of your State or Province?&lt;br /&gt;  [Unknown]:&lt;br /&gt;What is the two-letter country code for this unit?&lt;br /&gt;  [Unknown]:&lt;br /&gt;Is CN=jetty.mortbay.org, OU=Jetty, O=Mort Bay Consulting Pty. Ltd.,&lt;br /&gt;L=Unknown, ST=Unknown, C=Unknown correct?&lt;br /&gt;  [no]:  yes&lt;br /&gt;&lt;br /&gt;Enter key password for &lt;jetty&gt;&lt;br /&gt;        (RETURN if same as keystore password):  password&lt;br /&gt;You now have the minimal requirements to run an SSL connection and could proceed directly to Step 4 to configure an SSL connector.&lt;br /&gt;However the certificate you have generated will not be trusted by the browser and the user will be prompted to this effect. This is often sufficient for testing, but most public site will need to Step 2a to obtain a certificate trusted by most popular clients.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 1b: Keys and Certificates with openssl&lt;br /&gt;The following command generates a key pair in the file jetty.key:&lt;br /&gt;&lt;br /&gt;openssl genrsa -des3 -out jetty.key&lt;br /&gt;You may also wish to use the -rand file argument to provide an arbitrary file to help seed the random number generator.&lt;br /&gt;&lt;br /&gt;The following command generates a certificate for the key into the file jetty.crt:&lt;br /&gt;&lt;br /&gt;# &lt;b&gt;openssl req -new -x509 -key jetty.key -out jetty.crt&lt;br /&gt;This command will prompt for information about the certificate and for passwords to protect both the keystore and the keys within it. The only mandatory response is to provide the fully qualified host name of the server at the "Common Name" prompt. For example:&lt;br /&gt;&lt;br /&gt;openssl genrsa -des3 -out jetty.key&lt;br /&gt;Generating RSA private key, 512 bit long modulus&lt;br /&gt;...........................++++++++++++&lt;br /&gt;..++++++++++++&lt;br /&gt;e is 65537 (0x10001)&lt;br /&gt;Enter pass phrase for jetty.key:&lt;br /&gt;Verifying - Enter pass phrase for jetty.key:&lt;br /&gt;&lt;br /&gt;# openssl req -new -x509 -key jetty.key -out jetty.crt&lt;br /&gt;Enter pass phrase for jetty.key:&lt;br /&gt;You are about to be asked to enter information that will be incorporated&lt;br /&gt;into your certificate request.&lt;br /&gt;What you are about to enter is what is called a Distinguished Name or a DN.&lt;br /&gt;There are quite a few fields but you can leave some blank&lt;br /&gt;For some fields there will be a default value,&lt;br /&gt;If you enter '.', the field will be left blank.&lt;br /&gt;-----&lt;br /&gt;Country Name (2 letter code) [AU]:.&lt;br /&gt;State or Province Name (full name) [Some-State]:.&lt;br /&gt;Locality Name (eg, city) []:.&lt;br /&gt;Organization Name (eg, company) [Internet Widgets Pty Ltd]:Mort Bay Consulting Pty. Ltd.&lt;br /&gt;Organizational Unit Name (eg, section) []:Jetty&lt;br /&gt;Common Name (eg, YOUR name) []:jetty.mortbay.org&lt;br /&gt;Email Address []:&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;You now have the minimal requirements to run an SSL connection and could proceed directly to Step 3 to load these keys and certificates into a JSSE keystore. However the certificate you have generated will not be trusted by the browser and the user will be prompted to this effect. This is often sufficient for testing, but most public site will need to Step 2b to obtain a certificate trusted by most popular clients.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 1c: Keys and Certificates from other sources&lt;br /&gt;If you have keys and certificates from other sources, then you can proceed directly to Step 3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 2: Request a trusted certificate&lt;br /&gt;The keys and certificats generated in steps 1a and 1b are sufficient to run an SSL connector. However the certificate you have generated will not be trusted by the browser and the user will be prompted to this effect.&lt;br /&gt;&lt;br /&gt;To obtain a certificate that will be trusted by most common browsers, you need to request a well known certificate authority (CA) to sign your key/certificate. Such trusted CAs include: AddTrust, Entrust, GeoTrust, RSA Data Security, Thawte, VISA, ValiCert, Verisign, beTRUSTed, among others.&lt;br /&gt;&lt;br /&gt;Each CA will have their own instructions which should be followed (look for JSSE or openssl sections), but all will involved a step to&lt;br /&gt;generate a certificate signing request (CSR).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 2a: CSR from keytool&lt;br /&gt;The following commands generates the file jetty.csr using keytool for a key/cert already in the keystore:&lt;br /&gt;&lt;br /&gt;keytool -certreq -alias jetty -keystore keystore -file jetty.csr&lt;br /&gt;&lt;br /&gt;Step 2b: CSR from openssl&lt;br /&gt;The following commands generates the file jetty.csr using openssl for a key in the file jetty.key:&lt;br /&gt;&lt;br /&gt;openssl req -new -key jetty.key -out jetty.csr&lt;br /&gt;Note that this command only uses the existing key from jetty.key file and not a certificate in jetty.crt generated by step 1b. The details for the certificate need to be entered again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 3: Loading Keys and Certificates&lt;br /&gt;Once a CA has sent you a certificate, or if you generated your own certificate without keytool, then it will need to be loaded into&lt;br /&gt;a JSSE keystore. If you did not use keytool to generate the key, then it will also need to be loaded into the keystore.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 3a: Loading Certificates with keytool&lt;br /&gt;A certificate in PEM form may be directly loaded into a keystore with keytool. The PEM format is a text encoding of certificates and is produced by openssl (as in step 1b) and is returned by some CAs. An example PEM file is:&lt;br /&gt;&lt;br /&gt;jetty.crt&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;MIICSDCCAfKgAwIBAgIBADANBgkqhkiG9w0BAQQFADBUMSYwJAYDVQQKEx1Nb3J0&lt;br /&gt;IEJheSBDb25zdWx0aW5nIFB0eS4gTHRkLjEOMAwGA1UECxMFSmV0dHkxGjAYBgNV&lt;br /&gt;BAMTEWpldHR5Lm1vcnRiYXkub3JnMB4XDTAzMDQwNjEzMTk1MFoXDTAzMDUwNjEz&lt;br /&gt;MTk1MFowVDEmMCQGA1UEChMdTW9ydCBCYXkgQ29uc3VsdGluZyBQdHkuIEx0ZC4x&lt;br /&gt;DjAMBgNVBAsTBUpldHR5MRowGAYDVQQDExFqZXR0eS5tb3J0YmF5Lm9yZzBcMA0G&lt;br /&gt;CSqGSIb3DQEBAQUAA0sAMEgCQQC5V4oZeVdhdhHqa9L2/ZnKySPWUqqy81riNfAJ&lt;br /&gt;7uALW0kEv/LtlG34dOOcVVt/PK8/bU4dlolnJx1SpiMZbKsFAgMBAAGjga4wgasw&lt;br /&gt;HQYDVR0OBBYEFFV1gbB1XRvUx1UofmifQJS/MCYwMHwGA1UdIwR1MHOAFFV1gbB1&lt;br /&gt;XRvUx1UofmifQJS/MCYwoVikVjBUMSYwJAYDVQQKEx1Nb3J0IEJheSBDb25zdWx0&lt;br /&gt;aW5nIFB0eS4gTHRkLjEOMAwGA1UECxMFSmV0dHkxGjAYBgNVBAMTEWpldHR5Lm1v&lt;br /&gt;cnRiYXkub3JnggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADQQA6NkaV&lt;br /&gt;OtXzP4ayzBcgK/qSCmF44jdcARmrXhiXUcXzjxsLjSJeYPJojhUdC2LQKy+p4ki8&lt;br /&gt;Rcz6oCRvCGCe5kDB&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;The following command will load a PEM encoded certificate in the jetty.crt file into a JSSE keystore:&lt;br /&gt;&lt;br /&gt;keytool -keystore keystore -import -alias jetty -file jetty.crt -trustcacerts&lt;br /&gt;Depending on the situation you may not require the -trustcacerts option. Try the operation without it if you like.&lt;br /&gt;&lt;br /&gt;NOTE That you need both the private key and the certificate in the keystore. So the certificate should be loaded into the keystore used to generate the CSR (step 2a). If your key pair is not in a keystore (eg if generated as step 1b), then you will need to use the PKCS12 format to load both key and certificate as in step 3b.&lt;br /&gt;&lt;br /&gt;If the certificate your receive from the CA is not in a format that keytool understands, then the openssl command can be used to convert&lt;br /&gt;formats:&lt;br /&gt;&lt;br /&gt;openssl x509 -in jetty.der -inform DER -outform PEM -out jetty.crt&lt;br /&gt;Step 3b) Loading keys and certificates via PKCS12&lt;br /&gt;&lt;br /&gt;If you have a key and certificate in separate files, they need to be combined into a PKCS12 format file to be loaded into a new keystore. The certificate can be one you generated yourself or one that has been returned from a CA in response to your CSR.&lt;br /&gt;&lt;br /&gt;The following openssl command will combine the keys in jetty.key and the certificate in the jetty.crt file into the jetty.pkcs12 file:&lt;br /&gt;&lt;br /&gt;openssl pkcs12 -inkey jetty.key -in jetty.crt -export -out jetty.pkcs12&lt;br /&gt;If you have a chain of certificates, because your CA is an intermediary, build the pkcs12 file like this:&lt;br /&gt;&lt;br /&gt;# cat example.crt intermediate.crt [intermediate2.crt]... rootCA.crt &gt; cert-chain.txt&lt;br /&gt;# openssl pkcs12 -export -inkey example.key -in cert-chain.txt -out example.pkcs12&lt;br /&gt;The order of certificates must be from server to rootCA, as per RFC2246 section 7.4.2.&lt;br /&gt;&lt;br /&gt;OpenSSL is going to ask you for an "export password". A non-empty password seems to be required to make the next step work. The&lt;br /&gt;resulting PKCS12 file may be loaded into a JSSE keystore with the following jetty utility class:&lt;br /&gt;&lt;br /&gt;java -classpath $JETTY_HOME/lib/org.mortbay.jetty.jar org.mortbay.util.PKCS12Import jetty.pkcs12 keystore&lt;br /&gt;This asks for two passphrases. Give the password from the last step as the input passphrase and you are set. The "output passphrase" will need to appear in your jetty.xml config file as both the Password and KeyPassword of the SunJsseListener that will use the certificate.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 4: Configure Jetty&lt;br /&gt;&lt;Call name="addConnector"&gt;&lt;br /&gt;    &lt;Arg&gt;&lt;br /&gt;      &lt;New class="org.mortbay.jetty.security.SslSocketConnector"&gt;&lt;br /&gt;        &lt;Set name="Port"&gt;8443&lt;/Set&gt;&lt;br /&gt;        &lt;Set name="maxIdleTime"&gt;30000&lt;/Set&gt;&lt;br /&gt;        &lt;Set name="keystore"&gt;&lt;SystemProperty name="jetty.home" default="." /&gt;/etc/keystore&lt;/Set&gt;&lt;br /&gt;        &lt;Set name="password"&gt;OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4&lt;/Set&gt;&lt;br /&gt;        &lt;Set name="keyPassword"&gt;OBF:1u2u1wml1z7s1z7a1wnl1u2g&lt;/Set&gt;&lt;br /&gt;        &lt;Set name="truststore"&gt;&lt;SystemProperty name="jetty.home" default="." /&gt;/etc/keystore&lt;/Set&gt;&lt;br /&gt;        &lt;Set name="trustPassword"&gt;OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4&lt;/Set&gt;&lt;br /&gt;      &lt;/New&gt;&lt;br /&gt;    &lt;/Arg&gt;&lt;br /&gt;  &lt;/Call&gt;Remember that the default port for https is 443 not 80, so change 8443 to 443 if you want to be able to use URL's without explicit port numbers. For a production site it normally makes sense to have a HttpListener on port 80 and a SunJsseListener on port 443. Note that as these are privileged ports, you may want to use a redirection mechanism to map port 80 to eg 8080 and 443 to eg 8443. For details on this, see the [Running Jetty as a non-root user].&lt;br /&gt;&lt;br /&gt;The keystore file in this example is given relative to the jetty home directory. For production, choose a private directory with restricted access to keep your keystore in. Even though it has a password on it, the password may be configured into the runtime environment so is vulnerable to theft.&lt;br /&gt;&lt;br /&gt;Jetty can now be started the normal way (make sure that jcert.jar, jnet.jar and jsse.jar are on your classpath) and SSL can be used with a URL like:&lt;br /&gt;&lt;br /&gt;https://localhost:8443/&lt;br /&gt;Note: The most common mistake at this point is to try to access port 8443 with http rather than https.&lt;br /&gt;&lt;br /&gt;If CONFIDENTIAL or INTEGRAL security constraints are being used, then you should also configure the normal HTTP connector with which port to use for SSL:&lt;br /&gt;&lt;br /&gt;&lt;Call name="addConnector"&gt;&lt;br /&gt;      &lt;Arg&gt;&lt;br /&gt;          &lt;New class="org.mortbay.jetty.nio.SelectChannelConnector"&gt;&lt;br /&gt;            &lt;Set name="port"&gt;8080&lt;/Set&gt;&lt;br /&gt;            &lt;Set name="maxIdleTime"&gt;30000&lt;/Set&gt;&lt;br /&gt;            &lt;Set name="Acceptors"&gt;2&lt;/Set&gt;&lt;br /&gt;            &lt;Set name="confidentialPort"&gt;8443&lt;/Set&gt;&lt;br /&gt;          &lt;/New&gt;&lt;br /&gt;      &lt;/Arg&gt;&lt;br /&gt;    &lt;/Call&gt;Password Issues&lt;br /&gt;If the passwords are not provided in the configuration, they may be provided as java properties (jetty.ssl.password and jetty.ssl.keypassword) else they will be prompted for.&lt;br /&gt;&lt;br /&gt;Remember that putting your password on the command line is a security risk. They can also be set as properties within the config file, but this risks accidental discovery by developers.&lt;br /&gt;&lt;br /&gt;If jetty is given a password that begins with "OBF:" it is treated as an obfuscated password. Passwords can be obfuscated by&lt;br /&gt;running org.mortbay.jetty.security.Password as a main class. This can protect passwords from casual observation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Renewing Certificates&lt;br /&gt;If you are updating your configuration to use a newer certificate, as when the old one is expiring, just do Step 3. If you imported the key and certificate originally using the PKCS 12 method, use an alias of "1" rather than "jetty", because that is the alias the PKCS12 process enters into the keystore.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.&lt;br /&gt;Learn more or evaluate Confluence for your organisation. &lt;br /&gt;&lt;br /&gt;Powered by Atlassian Confluence&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-116365881417242642?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/116365881417242642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=116365881417242642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116365881417242642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/116365881417242642'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/11/certificate.html' title='certificate'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-115937472145157270</id><published>2006-09-27T09:31:00.000-07:00</published><updated>2006-09-27T09:32:01.756-07:00</updated><title type='text'>DNS diable java</title><content type='html'>http://www.rgagnon.com/javadetails/java-0445.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-115937472145157270?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/115937472145157270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=115937472145157270' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115937472145157270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115937472145157270'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/09/dns-diable-java.html' title='DNS diable java'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-115213029656237390</id><published>2006-07-05T13:11:00.000-07:00</published><updated>2006-07-05T13:11:39.980-07:00</updated><title type='text'>ethernet duplex problem</title><content type='html'>http://www.cisco.com/warp/public/473/46.html#auto_neg_valid&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-115213029656237390?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/115213029656237390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=115213029656237390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115213029656237390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115213029656237390'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/07/ethernet-duplex-problem.html' title='ethernet duplex problem'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-115203730739548470</id><published>2006-07-04T11:21:00.000-07:00</published><updated>2006-07-04T11:21:47.873-07:00</updated><title type='text'>InterruptException</title><content type='html'>Java theory and practice: Dealing with InterruptedException&lt;br /&gt;You caught it, now what are you going to do with it?&lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;  Document options &lt;br /&gt;  Print this page&lt;br /&gt; &lt;br /&gt;  E-mail this page&lt;br /&gt; &lt;br /&gt;  Discuss&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;New site feature &lt;br /&gt;  dW radio -- Listen to our podcasts &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Rate this page &lt;br /&gt;  Help us improve this content&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Level: Introductory&lt;br /&gt;&lt;br /&gt;Brian Goetz (brian@quiotix.com), Principal Consultant, Quiotix&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;23 May 2006&lt;br /&gt;&lt;br /&gt;Many Java™ language methods, such as Thread.sleep() and Object.wait(), throw InterruptedException. You can't ignore it because it's a checked exception, but what should you do with it? In this month's Java theory and practice, concurrency expert Brian Goetz explains what InterruptedException means, why it is thrown, and what you should do when you catch one. &lt;br /&gt;This story is probably familiar: You're writing a test program and you need to pause for some amount of time, so you call Thread.sleep(). But then the compiler or IDE balks that you haven't dealt with the checked InterruptedException. What is InterruptedException, and why do you have to deal with it? &lt;br /&gt;&lt;br /&gt;The most common response to InterruptedException is to swallow it -- catch it and do nothing (or perhaps log it, which isn't any better) -- as we'll see later in Listing 4. Unfortunately, this approach throws away important information about the fact that an interrupt occurred, which could compromise the application's ability to cancel activities or shut down in a timely manner. &lt;br /&gt;&lt;br /&gt;Blocking methods&lt;br /&gt;&lt;br /&gt;When a method throws InterruptedException, it is telling you several things in addition to the fact that it can throw a particular checked exception. It is telling you that it is a blocking method and that it will make an attempt to unblock and return early -- if you ask nicely. &lt;br /&gt;&lt;br /&gt;A blocking method is different from an ordinary method that just takes a long time to run. The completion of an ordinary method is dependent only on how much work you've asked it to do and whether adequate computing resources (CPU cycles and memory) are available. The completion of a blocking method, on the other hand, is also dependent on some external event, such as timer expiration, I/O completion, or the action of another thread (releasing a lock, setting a flag, or placing a task on a work queue). Ordinary methods complete as soon as their work can be done, but blocking methods are less predictable because they depend on external events. Blocking methods can compromise responsiveness because it can be hard to predict when they will complete. &lt;br /&gt;Because blocking methods can potentially take forever if the event they are waiting for never occurs, it is often useful for blocking operations to be cancelable. (It is often useful for long-running non-blocking methods to be cancelable as well.) A cancelable operation is one that can be externally moved to completion in advance of when it would ordinarily complete on its own. The interruption mechanism provided by Thread and supported by Thread.sleep() and Object.wait() is a cancellation mechanism; it allows one thread to request that another thread stop what it is doing early. When a method throws InterruptedException, it is telling you that if the thread executing the method is interrupted, it will make an attempt to stop what it is doing and return early and indicate its early return by throwing InterruptedException. Well-behaved blocking library methods should be responsive to interruption and throw InterruptedException so they can be used within cancelable activities without compromising responsiveness. &lt;br /&gt;&lt;br /&gt;Thread interruption&lt;br /&gt;&lt;br /&gt;Every thread has a Boolean property associated with it that represents its interrupted status. The interrupted status is initially false; when a thread is interrupted by some other thread through a call to Thread.interrupt(), one of two things happens. If that thread is executing a low-level interruptible blocking method like Thread.sleep(), Thread.join(), or Object.wait(), it unblocks and throws InterruptedException. Otherwise, interrupt() merely sets the thread's interruption status. Code running in the interrupted thread can later poll the interrupted status to see if it has been requested to stop what it is doing; the interrupted status can be read with Thread.isInterrupted() and can be read and cleared in a single operation with the poorly named Thread.interrupted(). &lt;br /&gt;&lt;br /&gt;Interruption is a cooperative mechanism. When one thread interrupts another, the interrupted thread does not necessarily stop what it is doing immediately. Instead, interruption is a way of politely asking another thread to stop what it is doing if it wants to, at its convenience. Some methods, like Thread.sleep(), take this request seriously, but methods are not required to pay attention to interruption. Methods that do not block but that still may take a long time to execute can respect requests for interruption by polling the interrupted status and return early if interrupted. You are free to ignore an interruption request, but doing so may compromise responsiveness. &lt;br /&gt;&lt;br /&gt;One of the benefits of the cooperative nature of interruption is that it provides more flexibility for safely constructing cancelable activities. We rarely want an activity to stop immediately; program data structures could be left in an inconsistent state if the activity were canceled mid-update. Interruption allows a cancelable activity to clean up any work in progress, restore invariants, notify other activities of the cancellation, and then terminate. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dealing with InterruptedException&lt;br /&gt;&lt;br /&gt;If throwing InterruptedException means that a method is a blocking method, then calling a blocking method means that your method is a blocking method too, and you should have a strategy for dealing with InterruptedException. Often the easiest strategy is to throw InterruptedException yourself, as shown in the putTask() and getTask() methods in Listing 1. Doing so makes your method responsive to interruption as well and often requires nothing more than adding InterruptedException to your throws clause. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 1. Propagating InterruptedException to callers by not catching it&lt;br /&gt;&lt;br /&gt;public class TaskQueue {&lt;br /&gt;    private static final int MAX_TASKS = 1000;&lt;br /&gt;&lt;br /&gt;    private BlockingQueue&lt;Task&gt; queue &lt;br /&gt;        = new LinkedBlockingQueue&lt;Task&gt;(MAX_TASKS);&lt;br /&gt;&lt;br /&gt;    public void putTask(Task r) throws InterruptedException { &lt;br /&gt;        queue.put(r);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Task getTask() throws InterruptedException { &lt;br /&gt;        return queue.take();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sometimes it is necessary to do some amount of cleanup before propagating the exception. In this case, you can catch InterruptedException, perform the cleanup, and then rethrow the exception. Listing 2, a mechanism for matching players in an online game service, illustrates this technique. The matchPlayers() method waits for two players to arrive and then starts a new game. If it is interrupted after one player has arrived but before the second player arrives, it puts that player back on the queue before rethrowing the InterruptedException, so that the player's request to play is not lost. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 2. Performing task-specific cleanup before rethrowing InterruptedException&lt;br /&gt;&lt;br /&gt;public class PlayerMatcher {&lt;br /&gt;    private PlayerSource players;&lt;br /&gt;&lt;br /&gt;    public PlayerMatcher(PlayerSource players) { &lt;br /&gt;        this.players = players; &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void matchPlayers() throws InterruptedException { &lt;br /&gt;        try {&lt;br /&gt;             Player playerOne, playerTwo;&lt;br /&gt;             while (true) {&lt;br /&gt;                 playerOne = playerTwo = null;&lt;br /&gt;                 // Wait for two players to arrive and start a new game&lt;br /&gt;                 playerOne = players.waitForPlayer(); // could throw IE&lt;br /&gt;                 playerTwo = players.waitForPlayer(); // could throw IE&lt;br /&gt;                 startNewGame(playerOne, playerTwo);&lt;br /&gt;             }&lt;br /&gt;         }&lt;br /&gt;         catch (InterruptedException e) {  &lt;br /&gt;             // If we got one player and were interrupted, put that player back&lt;br /&gt;             if (playerOne != null)&lt;br /&gt;                 players.addFirst(playerOne);&lt;br /&gt;             // Then propagate the exception&lt;br /&gt;             throw e;&lt;br /&gt;         }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Don't swallow interrupts&lt;br /&gt;&lt;br /&gt;Sometimes throwing InterruptedException is not an option, such as when a task defined by Runnable calls an interruptible method. In this case, you can't rethrow InterruptedException, but you also do not want to do nothing. When a blocking method detects interruption and throws InterruptedException, it clears the interrupted status. If you catch InterruptedException but cannot rethrow it, you should preserve evidence that the interruption occurred so that code higher up on the call stack can learn of the interruption and respond to it if it wants to. This task is accomplished by calling interrupt() to "reinterrupt" the current thread, as shown in Listing 3. At the very least, whenever you catch InterruptedException and don't rethrow it, reinterrupt the current thread before returning. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 3. Restoring the interrupted status after catching InterruptedException&lt;br /&gt;&lt;br /&gt;public class TaskRunner implements Runnable {&lt;br /&gt;    private BlockingQueue&lt;Task&gt; queue;&lt;br /&gt;&lt;br /&gt;    public TaskRunner(BlockingQueue&lt;Task&gt; queue) { &lt;br /&gt;        this.queue = queue; &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void run() { &lt;br /&gt;        try {&lt;br /&gt;             while (true) {&lt;br /&gt;                 Task task = queue.take(10, TimeUnit.SECONDS);&lt;br /&gt;                 task.execute();&lt;br /&gt;             }&lt;br /&gt;         }&lt;br /&gt;         catch (InterruptedException e) { &lt;br /&gt;             // Restore the interrupted status&lt;br /&gt;             Thread.currentThread().interrupt();&lt;br /&gt;         }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The worst thing you can do with InterruptedException is swallow it -- catch it and neither rethrow it nor reassert the thread's interrupted status. The standard approach to dealing with an exception you didn't plan for -- catch it and log it -- also counts as swallowing the interruption because code higher up on the call stack won't be able to find out about it. (Logging InterruptedException is also just silly because by the time a human reads the log, it is too late to do anything about it.) Listing 4 shows the all-too-common pattern of swallowing an interrupt: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 4. Swallowing an interrupt -- don't do this&lt;br /&gt;&lt;br /&gt;// Don't do this &lt;br /&gt;public class TaskRunner implements Runnable {&lt;br /&gt;    private BlockingQueue&lt;Task&gt; queue;&lt;br /&gt;&lt;br /&gt;    public TaskRunner(BlockingQueue&lt;Task&gt; queue) { &lt;br /&gt;        this.queue = queue; &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void run() { &lt;br /&gt;        try {&lt;br /&gt;             while (true) {&lt;br /&gt;                 Task task = queue.take(10, TimeUnit.SECONDS);&lt;br /&gt;                 task.execute();&lt;br /&gt;             }&lt;br /&gt;         }&lt;br /&gt;         catch (InterruptedException swallowed) { &lt;br /&gt;             /* DON'T DO THIS - RESTORE THE INTERRUPTED STATUS INSTEAD */&lt;br /&gt;         }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you cannot rethrow InterruptedException, whether or not you plan to act on the interrupt request, you still want to reinterrupt the current thread because a single interruption request may have multiple "recipients." The standard thread pool (ThreadPoolExecutor) worker thread implementation is responsive to interruption, so interrupting a task running in a thread pool may have the effect of both canceling the task and notifying the execution thread that the thread pool is shutting down. If the task were to swallow the interrupt request, the worker thread might not learn that an interrupt was requested, which could delay the application or service shutdown. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Implementing cancelable tasks&lt;br /&gt;&lt;br /&gt;Nothing in the language specification gives interruption any specific semantics, but in larger programs, it is difficult to maintain any semantics for interruption other than cancellation. Depending on the activity, a user could request cancellation through a GUI or through a network mechanism such as JMX or Web Services. It could also be requested by program logic. For example, a Web crawler might automatically shut itself down if it detects that the disk is full, or a parallel algorithm might start multiple threads to search different regions of the solution space and cancel them once one of them finds a solution. &lt;br /&gt;&lt;br /&gt;Just because a task is cancelable does not mean it needs to respond to an interrupt request immediately. For tasks that execute code in a loop, it is common to check for interruption only once per loop iteration. Depending on how long the loop takes to execute, it could take some time before the task code notices the thread has been interrupted (either by polling the interrupted status with Thread.isInterrupted() or by calling a blocking method). If the task needs to be more responsive, it can poll the interrupted status more frequently. Blocking methods usually poll the interrupted status immediately on entry, throwing InterruptedException if it is set to improve responsiveness. &lt;br /&gt;&lt;br /&gt;The one time it is acceptable to swallow an interrupt is when you know the thread is about to exit. This scenario only occurs when the class calling the interruptible method is part of a Thread, not a Runnable or general-purpose library code, as illustrated in Listing 5. It creates a thread that enumerates prime numbers until it is interrupted and allows the thread to exit upon interruption. The prime-seeking loop checks for interruption in two places: once by polling the isInterrupted() method in the header of the while loop and once when it calls the blocking BlockingQueue.put() method. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 5. Interrupts can be swallowed if you know the thread is about to exit&lt;br /&gt;&lt;br /&gt;public class PrimeProducer extends Thread {&lt;br /&gt;    private final BlockingQueue&lt;BigInteger&gt; queue;&lt;br /&gt;&lt;br /&gt;    PrimeProducer(BlockingQueue&lt;BigInteger&gt; queue) {&lt;br /&gt;        this.queue = queue;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void run() {&lt;br /&gt;        try {&lt;br /&gt;            BigInteger p = BigInteger.ONE;&lt;br /&gt;            while (!Thread.currentThread().isInterrupted())&lt;br /&gt;                queue.put(p = p.nextProbablePrime());&lt;br /&gt;        } catch (InterruptedException consumed) {&lt;br /&gt;            /* Allow thread to exit */&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void cancel() { interrupt(); }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Noninterruptible blocking&lt;br /&gt;&lt;br /&gt;Not all blocking methods throw InterruptedException. The input and output stream classes may block waiting for an I/O to complete, but they do not throw InterruptedException, and they do not return early if they are interrupted. However, in the case of socket I/O, if a thread closes the socket, blocking I/O operations on that socket in other threads will complete early with a SocketException. The nonblocking I/O classes in java.nio also do not support interruptible I/O, but blocking operations can similarly be canceled by closing the channel or requesting a wakeup on the Selector. Similarly, attempting to acquire an intrinsic lock (enter a synchronized block) cannot be interrupted, but ReentrantLock supports an interruptible acquisition mode. &lt;br /&gt;&lt;br /&gt;Noncancelable tasks&lt;br /&gt;&lt;br /&gt;Some tasks simply refuse to be interrupted, making them noncancelable. However, even noncancelable tasks should attempt to preserve the interrupted status in case code higher up on the call stack wants to act on the interruption after the noncancelable task completes. Listing 6 shows a method that waits on a blocking queue until an item is available, regardless of whether it is interrupted. To be a good citizen, it restores the interrupted status in a finally block after it is finished, so as not to deprive callers of the interruption request. (It can't restore the interrupted status earlier, as it would cause an infinite loop -- BlockingQueue.take() could poll the interrupted status immediately on entry and throws InterruptedException if it finds the interrupted status set.) &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 6. Noncancelable task that restores interrupted status before returning&lt;br /&gt;&lt;br /&gt;public Task getNextTask(BlockingQueue&lt;Task&gt; queue) {&lt;br /&gt;    boolean interrupted = false;&lt;br /&gt;    try {&lt;br /&gt;        while (true) {&lt;br /&gt;            try {&lt;br /&gt;                return queue.take();&lt;br /&gt;            } catch (InterruptedException e) {&lt;br /&gt;                interrupted = true;&lt;br /&gt;                // fall through and retry&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    } finally {&lt;br /&gt;        if (interrupted)&lt;br /&gt;            Thread.currentThread().interrupt();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;You can use the cooperative interruption mechanism provided by the Java platform to construct flexible cancellation policies. Activities can decide if they are cancelable or not, how responsive they want to be to interruption, and they can defer interruption to perform task-specific cleanup if returning immediately would compromise application integrity. Even if you want to completely ignore interruption in your code, make sure to restore the interrupted status if you catch InterruptedException and do not rethrow it so that the code that calls it is not deprived of the knowledge that an interrupt occurred.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-115203730739548470?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/115203730739548470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=115203730739548470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115203730739548470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115203730739548470'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/07/interruptexception.html' title='InterruptException'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-115190377154048360</id><published>2006-07-02T22:15:00.000-07:00</published><updated>2006-07-02T22:16:12.053-07:00</updated><title type='text'>garbage collection trick</title><content type='html'>http://www-128.ibm.com/developerworks/library/j-jtp01274.html&lt;br /&gt;&lt;br /&gt;How expensive is allocation?&lt;br /&gt;&lt;br /&gt;The 1.0 and 1.1 JDKs used a mark-sweep collector, which did compaction on some -- but not all -- collections, meaning that the heap might be fragmented after a garbage collection. Accordingly, memory allocation costs in the 1.0 and 1.1 JVMs were comparable to that in C or C++, where the allocator uses heuristics such as "first-first" or "best-fit" to manage the free heap space. Deallocation costs were also high, since the mark-sweep collector had to sweep the entire heap at every collection. No wonder we were advised to go easy on the allocator. &lt;br /&gt;&lt;br /&gt;In HotSpot JVMs (Sun JDK 1.2 and later), things got a lot better -- the Sun JDKs moved to a generational collector. Because a copying collector is used for the young generation, the free space in the heap is always contiguous so that allocation of a new object from the heap can be done through a simple pointer addition, as shown in Listing 1. This makes object allocation in Java applications significantly cheaper than it is in C, a possibility that many developers at first have difficulty imagining. Similarly, because copying collectors do not visit dead objects, a heap with a large number of temporary objects, which is a common situation in Java applications, costs very little to collect; simply trace and copy the live objects to a survivor space and reclaim the entire heap in one fell swoop. No free lists, no block coalescing, no compacting -- just wipe the heap clean and start over. So both allocation and deallocation costs per object went way down in JDK 1.2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 1. Fast allocation in a contiguous heap&lt;br /&gt;&lt;br /&gt;void *malloc(int n) { &lt;br /&gt;  synchronized (heapLock) {&lt;br /&gt;    if (heapTop - heapStart &gt; n)&lt;br /&gt;      doGarbageCollection();&lt;br /&gt;&lt;br /&gt;    void *wasStart = heapStart;&lt;br /&gt;    heapStart += n;&lt;br /&gt;    return wasStart;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Performance advice often has a short shelf life; while it was once true that allocation was expensive, it is now no longer the case. In fact, it is downright cheap, and with a few very compute-intensive exceptions, performance considerations are generally no longer a good reason to avoid allocation. Sun estimates allocation costs at approximately ten machine instructions. That's pretty much free -- certainly no reason to complicate the structure of your program or incur additional maintenance risks for the sake of eliminating a few object creations.&lt;br /&gt;&lt;br /&gt;Of course, allocation is only half the story -- most objects that are allocated are eventually garbage collected, which also has costs. But there's good news there, too. The vast majority of objects in most Java applications become garbage before the next collection. The cost of a minor garbage collection is proportional to the number of live objects in the young generation, not the number of objects allocated since the last collection. Because so few young generation objects survive to the next collection, the amortized cost of collection per allocation is fairly small (and can be made even smaller by simply increasing the heap size, subject to the availability of enough memory).&lt;br /&gt;&lt;br /&gt;But wait, it gets better&lt;br /&gt;&lt;br /&gt;The JIT compiler can perform additional optimizations that can reduce the cost of object allocation to zero. Consider the code in Listing 2, where the getPosition() method creates a temporary object to hold the coordinates of a point, and the calling method uses the Point object briefly and then discards it. The JIT will likely inline the call to getPosition() and, using a technique called escape analysis, can recognize that no reference to the Point object leaves the doSomething() method. Knowing this, the JIT can then allocate the object on the stack instead of the heap or, even better, optimize the allocation away completely and simply hoist the fields of the Point into registers. While the current Sun JVMs do not yet perform this optimization, future JVMs probably will. The fact that allocation can get even cheaper in the future, with no changes to your code, is just one more reason not to compromise the correctness or maintainability of your program for the sake of avoiding a few extra allocations. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 2. Escape analysis can eliminate many temporary allocations entirely&lt;br /&gt;&lt;br /&gt;void doSomething() { &lt;br /&gt;  Point p = someObject.getPosition();&lt;br /&gt;  System.out.println("Object is at (" + p.x, + ", " + p.y + ")");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Point getPosition() { &lt;br /&gt;  return new Point(myX, myY);&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Isn't the allocator a scalability bottleneck?&lt;br /&gt;&lt;br /&gt;Listing 1 shows that while allocation itself is fast, access to the heap structure must be synchronized across threads. So doesn't that make the allocator a scalability hazard? There are several clever tricks JVMs use to reduce this cost significantly. IBM JVMs use a technique called thread-local heaps, by which each thread requests a small block of memory (on the order of 1K) from the allocator, and small object allocations are satisfied out of that block. If the program requests a larger block than can be satisfied using the small thread-local heap, then the global allocator is used to either satisfy the request directly or to allocate a new thread-local heap. By this technique, a large percentage of allocations can be satisfied without contending for the shared heap lock. (Sun JVMs use a similar technique, instead using the term "Local Allocation Blocks.")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finalizers are not your friend&lt;br /&gt;&lt;br /&gt;Objects with finalizers (those that have a non-trivial finalize() method) have significant overhead compared to objects without finalizers, and should be used sparingly. Finalizeable objects are both slower to allocate and slower to collect. At allocation time, the JVM must register any finalizeable objects with the garbage collector, and (at least in the HotSpot JVM implementation) finalizeable objects must follow a slower allocation path than most other objects. Similarly, finalizeable objects are slower to collect, too. It takes at least two garbage collection cycles (in the best case) before a finalizeable object can be reclaimed, and the garbage collector has to do extra work to invoke the finalizer. The result is more time spent allocating and collecting objects and more pressure on the garbage collector, because the memory used by unreachable finalizeable objects is retained longer. Combine that with the fact that finalizers are not guaranteed to run in any predictable timeframe, or even at all, and you can see that there are relatively few situations for which finalization is the right tool to use. &lt;br /&gt;&lt;br /&gt;If you must use finalizers, there are a few guidelines you can follow that will help contain the damage. Limit the number of finalizeable objects, which will minimize the number of objects that have to incur the allocation and collection costs of finalization. Organize your classes so that finalizeable objects hold no other data, which will minimize the amount of memory tied up in finalizeable objects after they become unreachable, as there can be a long delay before they are actually reclaimed. In particular, beware when extending finalizeable classes from standard libraries.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Helping the garbage collector . . . not&lt;br /&gt;&lt;br /&gt;Because allocation and garbage collection at one time imposed significant performance costs on Java programs, many clever tricks were developed to reduce these costs, such as object pooling and nulling. Unfortunately, in many cases these techniques can do more harm than good to your program's performance.&lt;br /&gt;&lt;br /&gt;Object pooling&lt;br /&gt;&lt;br /&gt;Object pooling is a straightforward concept -- maintain a pool of frequently used objects and grab one from the pool instead of creating a new one whenever needed. The theory is that pooling spreads out the allocation costs over many more uses. When the object creation cost is high, such as with database connections or threads, or the pooled object represents a limited and costly resource, such as with database connections, this makes sense. However, the number of situations where these conditions apply is fairly small.&lt;br /&gt;&lt;br /&gt;In addition, object pooling has some serious downsides. Because the object pool is generally shared across all threads, allocation from the object pool can be a synchronization bottleneck. Pooling also forces you to manage deallocation explicitly, which reintroduces the risks of dangling pointers. Also, the pool size must be properly tuned to get the desired performance result. If it is too small, it will not prevent allocation; and if it is too large, resources that could get reclaimed will instead sit idle in the pool. By tying up memory that could be reclaimed, the use of object pools places additional pressure on the garbage collector. Writing an effective pool implementation is not simple.&lt;br /&gt;&lt;br /&gt;In his "Performance Myths Exposed" talk at JavaOne 2003 (see Resources), Dr. Cliff Click offered concrete benchmarking data showing that object pooling is a performance loss for all but the most heavyweight objects on modern JVMs. Add in the serialization of allocation and the dangling-pointer risks, and it's clear that pooling should be avoided in all but the most extreme cases. &lt;br /&gt;&lt;br /&gt;Explicit nulling&lt;br /&gt;&lt;br /&gt;Explicit nulling is simply the practice of setting reference objects to null when you are finished with them. The idea behind nulling is that it assists the garbage collector by making objects unreachable earlier. Or at least that's the theory.&lt;br /&gt;&lt;br /&gt;There is one case where the use of explicit nulling is not only helpful, but virtually required, and that is where a reference to an object is scoped more broadly than it is used or considered valid by the program's specification. This includes cases such as using a static or instance field to store a reference to a temporary buffer, rather than a local variable (see Resources for a link to "Eye on performance: Referencing objects" for an example), or using an array to store references that may remain reachable by the runtime but not by the implied semantics of the program. Consider the class in Listing 3, which is an implementation of a simple bounded stack backed by an array. When pop() is called, without the explicit nulling in the example, the class could cause a memory leak (more properly called "unintentional object retention," or sometimes called "object loitering") because the reference stored in stack[top+1] is no longer reachable by the program, but still considered reachable by the garbage collector. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 3. Avoiding object loitering in a stack implementation&lt;br /&gt;&lt;br /&gt;public class SimpleBoundedStack {&lt;br /&gt;  private static final int MAXLEN = 100;&lt;br /&gt;  private Object stack[] = new Object[MAXLEN];&lt;br /&gt;  private int top = -1;&lt;br /&gt;&lt;br /&gt;  public void push(Object p) { stack [++top] = p;}&lt;br /&gt;&lt;br /&gt;  public Object pop() {&lt;br /&gt;    Object p = stack [top];&lt;br /&gt;    stack [top--] = null;  // explicit null&lt;br /&gt;    return p;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the September 1997 "Java Developer Connection Tech Tips" column (see Resources), Sun warned of this risk and explained how explicit nulling was needed in cases like the pop() example above. Unfortunately, programmers often take this advice too far, using explicit nulling in the hope of helping the garbage collector. But in most cases, it doesn't help the garbage collector at all, and in some cases, it can actually hurt your program's performance.&lt;br /&gt;&lt;br /&gt;Consider the code in Listing 4, which combines several really bad ideas. The listing is a linked list implementation that uses a finalizer to walk the list and null out all the forward links. We've already discussed why finalizers are bad. This case is even worse because now the class is doing extra work, ostensibly to help the garbage collector, but that will not actually help -- and might even hurt. Walking the list takes CPU cycles and will have the effect of visiting all those dead objects and pulling them into the cache -- work that the garbage collector might be able to avoid entirely, because copying collectors do not visit dead objects at all. Nulling the references doesn't help a tracing garbage collector anyway; if the head of the list is unreachable, the rest of the list won't be traced anyway. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 4. Combining finalizers and explicit nulling for a total performance disaster -- don't do this!&lt;br /&gt;&lt;br /&gt;public class LinkedList {&lt;br /&gt;&lt;br /&gt;  private static class ListElement {&lt;br /&gt;    private ListElement nextElement;&lt;br /&gt;    private Object value;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  private ListElement head;&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;&lt;br /&gt;  public void finalize() { &lt;br /&gt;    try {&lt;br /&gt;      ListElement p = head;&lt;br /&gt;      while (p != null) {&lt;br /&gt;        p.value = null;&lt;br /&gt;        ListElement q = p.nextElement;&lt;br /&gt;        p.nextElement = null;&lt;br /&gt;        p = q;&lt;br /&gt;      }&lt;br /&gt;      head = null;&lt;br /&gt;    }&lt;br /&gt;    finally {&lt;br /&gt;      super.finalize();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Explicit nulling should be saved for cases where your program is subverting normal scoping rules for performance reasons, such as the stack example in Listing 3 (a more correct -- but poorly performing -- implementation would be to reallocate and copy the stack array each time it is changed).&lt;br /&gt;&lt;br /&gt;Explicit garbage collection&lt;br /&gt;&lt;br /&gt;A third category where developers often mistakenly think they are helping the garbage collector is the use of System.gc(), which triggers a garbage collection (actually, it merely suggests that this might be a good time for a garbage collection). Unfortunately, System.gc() triggers a full collection, which includes tracing all live objects in the heap and sweeping and compacting the old generation. This can be a lot of work. In general, it is better to let the system decide when it needs to collect the heap, and whether or not to do a full collection. Most of the time, a minor collection will do the job. Worse, calls to System.gc() are often deeply buried where developers may be unaware of their presence, and where they might get triggered far more often than necessary. If you are concerned that your application might have hidden calls to System.gc() buried in libraries, you can invoke the JVM with the -XX:+DisableExplicitGC option to prevent calls to System.gc() and triggering a garbage collection. &lt;br /&gt;&lt;br /&gt;Immutability, again&lt;br /&gt;&lt;br /&gt;No installment of Java theory and practice would be complete without some sort of plug for immutability. Making objects immutable eliminates entire classes of programming errors. One of the most common reasons given for not making a class immutable is the belief that doing so would compromise performance. While this is true sometimes, it is often not -- and sometimes the use of immutable objects has significant, and perhaps surprising, performance advantages.&lt;br /&gt;&lt;br /&gt;Many objects function as containers for references to other objects. When the referenced object needs to change, we have two choices: update the reference (as we would in a mutable container class) or re-create the container to hold a new reference (as we would in an immutable container class). Listing 5 shows two ways to implement a simple holder class. Assuming the containing object is small, which is often the case (such as a Map.Entry element in a Map or a linked list element), allocating a new immutable object has some hidden performance advantages that come from the way generational garbage collectors work, having to do with the relative age of objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 5. Mutable and immutable object holders&lt;br /&gt;&lt;br /&gt;public class MutableHolder {&lt;br /&gt;  private Object value;&lt;br /&gt;  public Object getValue() { return value; }&lt;br /&gt;  public void setValue(Object o) { value = o; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class ImmutableHolder {&lt;br /&gt;  private final Object value;&lt;br /&gt;  public ImmutableHolder(Object o) { value = o; }&lt;br /&gt;  public Object getValue() { return value; }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In most cases, when a holder object is updated to reference a different object, the new referent is a young object. If we update a MutableHolder by calling setValue(), we have created a situation where an older object references a younger one. On the other hand, by creating a new ImmutableHolder object instead, a younger object is referencing an older one. The latter situation, where most objects point to older objects, is much more gentle on a generational garbage collector. If a MutableHolder that lives in the old generation is mutated, all the objects on the card that contain the MutableHolder must be scanned for old-to-young references at the next minor collection. The use of mutable references for long-lived container objects increases the work done to track old-to-young references at collection time. (See last month's article and this month's Resources, which explain the card-marking algorithm used to implement the write barrier in the generational collector used by current Sun JVMs).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When good performance advice goes bad&lt;br /&gt;&lt;br /&gt;A cover story in the July 2003 Java Developer's Journal illustrates how easy it is for good performance advice to become bad performance advice by simply failing to adequately identify the conditions under which the advice should be applied or the problem it was intended to solve. While the article contains some useful analysis, it will likely do more harm than good (and, unfortunately, far too much performance-oriented advice falls into this same trap).&lt;br /&gt;&lt;br /&gt;The article opens with a set of requirements from a realtime environment, where unpredictable garbage collection pauses are unacceptable and there are strict operational requirements on how long a pause can be tolerated. The authors then recommend nulling references, object pooling, and scheduling explicit garbage collection to meet the performance goals. So far, so good -- they had a problem and they figured out what they had to do to solve it (although they appear to have failed to identify what the costs of these practices were or explore some less intrusive alternatives, such as concurrent collection). Unfortunately, the article's title ("Avoid Bothersome Garbage Collection Pauses") and presentation suggest that this advice would be useful for a wide range of applications -- perhaps all Java applications. This is terrible, dangerous performance advice!&lt;br /&gt;&lt;br /&gt;For most applications, explicit nulling, object pooling, and explicit garbage collection will harm the throughput of your application, not improve it -- not to mention the intrusiveness of these techniques on your program design. In certain situations, it may be acceptable to trade throughput for predictability -- such as real-time or embedded applications. But for many Java applications, including most server-side applications, you probably would rather have the throughput.&lt;br /&gt;&lt;br /&gt;The moral of the story is that performance advice is highly situational (and has a short shelf life). Performance advice is by definition reactive -- it is designed to address a particular problem that occurred in a particular set of circumstances. If the underlying circumstances change, or they are simply not applicable to your situation, the advice may not be applicable, either. Before you muck up your program's design to improve its performance, first make sure you have a performance problem and that following the advice will solve that problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;Garbage collection has come a long way in the last several years. Modern JVMs offer fast allocation and do their job fairly well on their own, with shorter garbage collection pauses than in previous JVMs. Tricks such as object pooling or explicit nulling, which were once considered sensible techniques for improving performance, are no longer necessary or helpful (and may even be harmful) as the cost of allocation and garbage collection has been reduced considerably. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Resources&lt;br /&gt;&lt;br /&gt;Participate in the discussion forum.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Read the complete Java theory and practice series by Brian Goetz.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The previous two installments of Java theory and practice, "A brief history of garbage collection" and "Garbage collection in the 1.4.1 JVM," cover some of the basics of garbage collection in Java virtual machines.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Garbage Collection: Algorithms for Automatic Dynamic Memory Management (John Wiley &amp; Sons, 1997) is a comprehensive survey of garbage collection algorithms, with an extensive bibliography. The author, Richard Jones, maintains an updated bibliography of nearly 2000 papers on garbage collection on his Garbage Collection Page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Garbage Collection mailing list maintains a GC FAQ.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The IBM 1.4 SDK for the Java plaform uses a mark-sweep-compact collector, which supports incremental compaction to reduce pause times.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The three-part series, Sensible sanitation by Sam Borman (developerWorks, August 2002), describes the garbage collection strategy employed by the IBM 1.2 and 1.3 SDKs for the Java platform.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This article from the IBM Systems Journal describes some of the lessons learned building the IBM 1.1.x JDKs, including the details of mark-sweep and mark-sweep-compact garbage collection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The example in Listing 3 was raised by Sun in a 1997 Tech Tip.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The paper "Removing GC Sychronisation" is a nice survey of potential scalability bottlenecks in garbage collection implementations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the paper "A fast write barrier for generational garbage collectors," Urs Hoeltze covers both the classical card-marking algorithm and an improvement that can reduce the cost of marking significantly by slightly increasing the cost of scanning dirty cards at collection time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;"Eye on performance: Referencing objects" (developerWorks, August 2003) by Jack Shirazi and Kirk Pepperdine offers some insight into improperly scoped variables and the need for explicit nulling.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Find hundreds more Java technology resources on the developerWorks Java technology zone.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Browse for books on these and other technical topics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-115190377154048360?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/115190377154048360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=115190377154048360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115190377154048360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115190377154048360'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/07/garbage-collection-trick.html' title='garbage collection trick'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-115041657971173363</id><published>2006-06-15T17:07:00.000-07:00</published><updated>2006-06-15T17:09:40.266-07:00</updated><title type='text'>different java reference</title><content type='html'>http://tutorials.beginners.co.uk/integrate_read/i/216/vs_p/p/p/3&lt;br /&gt;&lt;br /&gt;Java: Performance Tuning and Memory Management Part 4 - Memory Utilization &lt;br /&gt;Submitted By: Wrox Books  &lt;br /&gt;Published Date: 9th March 2001   &lt;br /&gt;Viewed: 19,664 times &lt;br /&gt; &lt;br /&gt;Full computer related training courses are available in our membership area. To view over 400 Beginners.co.uk courses, click here. An annual training membership costs only £99 OR $149.  &lt;br /&gt; &lt;br /&gt;Although Java's performance problems have often been exaggerated, it is true that Java programs sometimes use a large amount of memory.  &lt;br /&gt;  &lt;br /&gt;Garbage Collection and the finalize() Method&lt;br /&gt;&lt;br /&gt;Before an object is destroyed by the garbage collector, the object's finalize() method is called to allow it to perform any necessary cleanup tasks. For example, if the object had used native methods to obtain resources (allocate memory, create network connections, etc.), it might be necessary to release those resources explicitly before the object is destroyed.&lt;br /&gt;&lt;br /&gt;Just as you cannot be guaranteed that an object will ever be garbage collected, you cannot be certain that its finalize() method will be called. In Java 1.1, you could use the static runFinalizersOnExit() method in the java.lang.System class to force each object's finalize() method to be called prior to the termination of the JVM process. However, that method is deprecated in Java 2 because of problems that can occur when an object's finalize() method is invoked by one thread while another thread may be modifying the same object's state. In other words, runFinalizersOnExit() causes the finalize() method to be called for every object not previously finalized, even those that are still reachable.&lt;br /&gt;&lt;br /&gt;To illustrate the fact that it's not possible to predict when or if the garbage collector will run, we can make some minor modifications to the GarbageTest class defined earlier. Specifically, we'll override finalize() in GarbageTest and TestClass so that they'll issue messages before instances are garbage collected: &lt;br /&gt;public class GarbageTest {&lt;br /&gt;&lt;br /&gt;  protected Object objectRef;&lt;br /&gt;&lt;br /&gt;  public static void main(String[] args) {&lt;br /&gt;    GarbageTest gt = new GarbageTest();&lt;br /&gt;    System.out.println("Exiting main()");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public GarbageTest() {&lt;br /&gt;    objectRef = new TestClass(this);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  protected void finalize() throws Throwable {&lt;br /&gt;    System.out.println("Finalizing GarbageTest");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  class TestClass {&lt;br /&gt;&lt;br /&gt;    Object testref;&lt;br /&gt;&lt;br /&gt;    public TestClass(Object objref) {&lt;br /&gt;      testref = objref;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    protected void finalize() throws Throwable {&lt;br /&gt;      System.out.println("Finalizing TestClass");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;When this code is executed, neither finalize() method is called prior to termination of the JVM, so the only output produced is the message issued from the main() method as shown below: &lt;br /&gt;&lt;br /&gt;Exiting main()&lt;br /&gt;&lt;br /&gt;However, the main() method can be modified to force the execution of the objects' finalize() methods prior to exit by using the deprecated runFinalizersOnExit() method as shown below: &lt;br /&gt;&lt;br /&gt;  public static void main(String[] args) {&lt;br /&gt;    GarbageTest gt = new GarbageTest();&lt;br /&gt;    System.runFinalizersOnExit(true);&lt;br /&gt;    System.out.println("Exiting main()");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;Executing this modified version of GarbageTest produces the following output, illustrating that the finalize() methods of both the GarbageTest and TestClass instances were called prior to termination of the JVM: &lt;br /&gt;&lt;br /&gt;Exiting main()&lt;br /&gt;Finalizing TestClass&lt;br /&gt;Finalizing GarbageTest&lt;br /&gt;&lt;br /&gt;Ensuring that the finalize() methods are called without using the deprecated runFinalizersOnExit() method is slightly more complex, and as we'll see, depends upon the garbage collector implementation. For example, we can attempt to make this occur by making the GarbageTest instance unreachable while still executing the main() and then calling System.gc() as shown below: &lt;br /&gt;&lt;br /&gt;  public static void main(String[] args) {&lt;br /&gt;    GarbageTest gt = new GarbageTest();&lt;br /&gt;    // System.runFinalizersOnExit(true);&lt;br /&gt;    gt = null;&lt;br /&gt;    System.gc();&lt;br /&gt;    System.out.println("Exiting main()");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;Since the only reference to the GarbageTest instance is the local variable defined in the main() method, the following line makes that object unreachable: &lt;br /&gt;&lt;br /&gt;gt = null;&lt;br /&gt;&lt;br /&gt;Since the object is unreachable, the call to System.gc() should cause the garbage collector to reclaim both the GarbageTest object and the TestClass instance to which it maintains a reference, and this is what happens with the "HotSpot" JVM in JDK 1.3 on Win32. However, if you execute this code using release 1.2.2 of JavaSoft's JVM for Win32 platforms, the following output is produced: &lt;br /&gt;&lt;br /&gt;Exiting main()&lt;br /&gt;&lt;br /&gt;In other words, although both objects are unreachable, they are incorrectly ignored by the garbage collector, which occurs because the garbage collector in 1.2.2 is a partially accurate implementation. Its design makes it unable to identify some objects that are legitimate targets for collection, which can lead to memory leaks in your code. Interestingly enough, if you make the following minor change to the GarbageTest class and execute the modified version, the results will be different: &lt;br /&gt;&lt;br /&gt;  public static void main(String[] args) {&lt;br /&gt;    createAndRelease();&lt;br /&gt;    System.gc();&lt;br /&gt;    System.out.println("Exiting main()");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  private static void createAndRelease() {&lt;br /&gt;    GarbageTest gt = new GarbageTest();&lt;br /&gt;    gt = null;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;Running this version of the GarbageTest program causes the garbage collector to correctly reclaim both the GarbageTest object and the TestClass instance to which it maintains a reference. The output produced by running the code is shown below: &lt;br /&gt;&lt;br /&gt;Finalizing GarbageTest&lt;br /&gt;Finalizing TestClass&lt;br /&gt;Exiting main()&lt;br /&gt;&lt;br /&gt;Perhaps even more strangely, eliminating the second line (gt = null;) in the createAndRelease() method shown above causes the garbage collector to again fail to reclaim the two unreachable objects. These variations on the GarbageTest class and the different results that they produce illustrate the unreliability of partially accurate garbage collector algorithms. In a small application that runs for only a short length of time, such omissions may not be significant. However, for an application that is expected to continue running for a long time, the failure to reclaim unused heap space can become a serious problem and even cause the application to fail with an OutOfMemoryError.&lt;br /&gt;&lt;br /&gt;Fortunately, the HotSpot technology included in the JDK 1.3 JVM includes a fully accurate garbage collector. It will correctly reclaim the GarbageTest and TestClass objects with any of the implementations of the GarbageTest code described above: with or without the createAndRelease() method, and with or without assigning a null value to the gt variable.&lt;br /&gt;&lt;br /&gt;Reference Objects&lt;br /&gt;&lt;br /&gt;Prior to Java 2, object instances were garbage collected only when there were no more references to them from live threads. However, Java 2 includes classes that allow you to maintain special types of references to objects, and those new reference types will not prevent objects from being garbage collected.&lt;br /&gt;&lt;br /&gt;The classes are defined in the java.lang.ref package, and the Reference class is the superclass of the three new reference types: SoftReference, WeakReference, and PhantomReference. In addition to these classes, the ReferenceQueue class allows you to determine when references to an object have been cleared. References are normally cleared by the garbage collector when it prepares to reclaim an object, but you can explicitly clear a reference by calling the Reference object's clear() method.&lt;br /&gt;&lt;br /&gt;The traditional type of object reference provided in earlier releases of Java is referred to as a strong reference, and object instances with strong references cannot be garbage collected. The new reference types provide what are known collectively as weak references, which is somewhat confusing since the WeakReference class represents only one of these types. To create a weak reference to an object, you simply create an instance of the appropriate class, passing its constructor a reference to the object as shown below: &lt;br /&gt;&lt;br /&gt;// The myObject variable represents a strong reference&lt;br /&gt;Object o = new Object();&lt;br /&gt;// The softRef variable represents a soft reference&lt;br /&gt;SoftReference softRef = new SoftReference(o);&lt;br /&gt;// The weakRef variable represents a weak reference&lt;br /&gt;WeakReference weakRef = new WeakReference(o);&lt;br /&gt;// The phantomRef variable represents a phantom reference&lt;br /&gt;// When creating a phantom reference, you must specify a reference&lt;br /&gt;// queue (discussed later)&lt;br /&gt;ReferenceQueue rq = new ReferenceQueue();&lt;br /&gt;PhantomReference phantomRef = new PhantomReference(o, rg);&lt;br /&gt;&lt;br /&gt;SoftReference and WeakReference instances can be used to create additional (possibly strong) references to the referenced object (also known as the referent) through the get() method. For example, the following code illustrates how a SoftReference is created, and is later used to create a strong reference to the referent: &lt;br /&gt;&lt;br /&gt;byte[] buffer = new byte[10000];&lt;br /&gt;SoftReference bufferRef = new SoftReference(buffer);&lt;br /&gt;// Eliminate the strong reference&lt;br /&gt;buffer = null;&lt;br /&gt;// ...&lt;br /&gt;&lt;br /&gt;// Create a new strong reference&lt;br /&gt;byte[] bufferData = (byte[])(bufferRef.get());&lt;br /&gt;&lt;br /&gt;Note, however, that the get() method will return a null value if the reference was reclaimed by the garbage collector after the weak reference was created. Therefore, when you do use get() to attempt to access the referent, you should ensure that it did not return a null before you use the return value.&lt;br /&gt;&lt;br /&gt;An object is classified based on the strongest type of reference that exists to that object, and will be one of the following five values: &lt;br /&gt;&lt;br /&gt;A strongly reachable object has strong references and may have soft, weak, or phantom references. &lt;br /&gt;A softly reachable object has soft references and may have weak or phantom references, but does not have strong references. &lt;br /&gt;A weakly reachable object has weak references and may have phantom references, but does not have strong or soft references. &lt;br /&gt;A phantomly reachable object has only phantom references; it does not have strong, soft, or weak references. &lt;br /&gt;An unreachable object is one for which there are no references of any kind. &lt;br /&gt;In contrast, an object that is referenced through a chain of references is only as reachable as the weakest reference in the chain. For example, the following illustrates how a string of references can be created: &lt;br /&gt;&lt;br /&gt;SoftReference sr = new SoftReference(new WeakReference(new Date()));&lt;br /&gt;&lt;br /&gt;In this case, the Date instance is only weakly reachable, because it is referenced through a chain of two references, one of which is a WeakReference.&lt;br /&gt;&lt;br /&gt;At this point, you may be wondering why there are three different types of weak references, and how their behavior differs. SoftReference and WeakReference are very similar in function and behavior, but there is one important difference. Garbage collector implementations are discouraged (but not prevented) from reclaiming softly reachable objects, especially those that have been created or accessed recently. In contrast, the garbage collector will reclaim a weakly reachable object just as if no references existed to it at all.&lt;br /&gt;&lt;br /&gt;Phantom references are very different from the other two types, and are intended to be used specifically to allow you to determine when an object is about to be destroyed by the garbage collector. In fact, the get() method of a PhantomReference always returns null, even when the referent has not yet been garbage collected. After the referent's finalize() method has been called but before it is destroyed, any PhantomReference instances that refer to the referent are added to the appropriate ReferenceQueue. &lt;br /&gt;&lt;br /&gt;Garbage collection of the referent will not be completed until the PhantomReference's clear() method is called, so it is the responsibility of your application to do so when using phantom references. Your code should wait for PhantomReference instances to be placed on the queue by the garbage collector, perform the appropriate cleanup for the referent, and then call the clear() method to allow the referent to be reclaimed.&lt;br /&gt;&lt;br /&gt;The methods defined in ReferenceQueue simply allow you to retrieve Reference objects that have been placed on the queue. One implementation of the remove() method waits indefinitely until a Reference appears in the queue and returns that object. The other version of remove() allows you to specify the maximum number of milliseconds that it will wait for a Reference to be queued, and if none becomes available within that time, it returns a null value. &lt;br /&gt;&lt;br /&gt;Finally, the poll() method always returns immediately, providing the caller with either a Reference that was queued or with a null value if none is available. In other words, the remove() method blocks the calling thread until an entry is available in queue or until the specified amount of time elapses, while poll() never blocks the caller.&lt;br /&gt;&lt;br /&gt;How Reference Objects can be Used&lt;br /&gt;&lt;br /&gt;Now that the behavior of the three Reference subclasses has been described, we'll briefly examine how each one can be used. Although many of the examples shown here use the java.lang.ref classes directly, you'll often find it more useful to subclass one of those when using weak references with your application. By creating a subclass, you can associate more information with the reference about how it is used and/or what action to take when you detect that its referent was cleared.&lt;br /&gt;&lt;br /&gt;SoftReference&lt;br /&gt;&lt;br /&gt;You can use SoftReference instances to cache information that should be discarded when your application begins to run low on memory. For example, if you're reading information from a database or files from a web browser, it may be useful to cache that data in memory as long as it does not cause your application to run out of memory. When the application needs to read information that was previously retrieved from the database or the network, it can first check the SoftReference-based cache. If the reference has not been cleared, the data can be quickly returned from the memory cache, but if it has been cleared, the data can again be retrieved from the database or network.&lt;br /&gt;&lt;br /&gt;WeakReference&lt;br /&gt;&lt;br /&gt;You'll sometimes wish to associate information with an object without preventing that object from being garbage collected, and you'll want the information to be destroyed when the object is reclaimed. If you were to use a "traditional" (strong) reference to associate the object with its information the object would never be garbage collected. For example, suppose that you use a Hashtable to maintain a relationship between objects and their information as shown below: &lt;br /&gt;&lt;br /&gt;Hashtable ht = new Hashtable();&lt;br /&gt;// ...&lt;br /&gt;MyObject myObj = new MyObject();&lt;br /&gt;ht.put(myObj, "This is the associated information");&lt;br /&gt;&lt;br /&gt;The problem with this approach is that as long as a reference to the Hashtable exists and as long as it contains a strong reference to the MyObject instance, that object will never be reclaimed. However, by creating an association with a WeakReference, you can define a mapping that lasts only for the lifetime of the MyObject instance without affecting the garbage collector's ability to reclaim the object. In fact, that is exactly what the java.util.WeakHashMap class does, and an example of how it might be used is provided below: &lt;br /&gt;&lt;br /&gt;WeakHashMap map = new WeakHashMap();&lt;br /&gt;// ...&lt;br /&gt;MyObject myObj = new MyObject();&lt;br /&gt;map.put(myObj, "This is the associated information");&lt;br /&gt;&lt;br /&gt;Each key in a WeakHashMap is an instance of a subclass of WeakReference, which allows the MyObject instance to be reclaimed by the garbage collector when there are no more strong references to it. Once that does occur, the WeakReference key entry in the map will remain, but its referent will be cleared and it will be placed on a ReferenceQueue. When an entry is added to or removed from the WeakHashMap, it checks the queue to see if any of its entries have been cleared and removes those that represent items that were garbage collected.&lt;br /&gt;&lt;br /&gt;PhantomReference&lt;br /&gt;&lt;br /&gt;As mentioned earlier, the purpose of the PhantomReference is to allow you to perform cleanup tasks for objects before they are destroyed by the garbage collector. Use of a ReferenceQueue with a SoftReference or WeakReference is optional, but each PhantomReference you construct must be associated with a ReferenceQueue as shown below: &lt;br /&gt;&lt;br /&gt;MyObject myObj = new MyObject();&lt;br /&gt;ReferenceQueue rq = new ReferenceQueue();&lt;br /&gt;PhantomReference pr = new PhantomReference(myObj, rq);&lt;br /&gt;&lt;br /&gt;You may wish to create a separate thread that waits for entries to be added to a ReferenceQueue, or you might design your code so that it periodically calls the poll() method. When a PhantomReference is retrieved from the queue, the appropriate cleanup should be performed for its reference and the clear() method called to allow the referent to be garbage collected.&lt;br /&gt;&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;In this chapter, we have looked at: &lt;br /&gt;&lt;br /&gt;Using HPROF to examine the performance of a Java application, and to locate the source of a performance problem &lt;br /&gt;Tips for improving the performance of your applications &lt;br /&gt;The various types of Java compilers that are available, including Just-In-Time compilers and Sun's HotSpot technology &lt;br /&gt;Memory management, including examination of garbage collection and reference objects&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-115041657971173363?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/115041657971173363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=115041657971173363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115041657971173363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/115041657971173363'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/06/different-java-reference.html' title='different java reference'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114815032368105992</id><published>2006-05-20T11:37:00.000-07:00</published><updated>2006-05-20T11:38:44.473-07:00</updated><title type='text'>java profiler comparison</title><content type='html'>http://www.javaworld.com/javaworld/jw-08-2003/jw-0822-profiler-p3.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114815032368105992?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114815032368105992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114815032368105992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114815032368105992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114815032368105992'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/05/java-profiler-comparison.html' title='java profiler comparison'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114695290213892757</id><published>2006-05-06T14:58:00.000-07:00</published><updated>2006-05-06T15:01:42.826-07:00</updated><title type='text'>rmi without registry</title><content type='html'>http://www.st.informatik.tu-darmstadt.de/static/staff/Haupt/rmi.html&lt;br /&gt;&lt;br /&gt;Using Java RMI without rmiregistry&lt;br /&gt;When I had to write a kind of small remote control for an application, I came across this. Normally, you have to start rmiregistry in order to let other machines access remote functionality. This was not applicable in my system, so I googled for some solution and finally came across something that worked out. Here is a step-by-step list of things to do.&lt;br /&gt;&lt;br /&gt;Create an interface for the service. &lt;br /&gt;Implement the service. Note that the implementation of the service is also the server application in this example. &lt;br /&gt;Implement the client. &lt;br /&gt;Compile and run. &lt;br /&gt;&lt;br /&gt;The example consists of three small packages, namely simplermi containing the service interface, simplermi.server containing the server implementation, and simplermi.client containing the client.&lt;br /&gt;&lt;br /&gt;If you have any objections or remarks, feel free to notify me.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Create an Interface for the Service [Top] &lt;br /&gt;&lt;br /&gt;The service used as an example is quite simple. It consists of a sole method named request() that returns a String.&lt;br /&gt;&lt;br /&gt;package simplermi;&lt;br /&gt;&lt;br /&gt;import java.rmi.Remote;&lt;br /&gt;import java.rmi.RemoteException;&lt;br /&gt;&lt;br /&gt;public interface SimpleServiceIfc extends Remote {&lt;br /&gt;  String request() throws RemoteException;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Implement the Service [Top] &lt;br /&gt;&lt;br /&gt;The service implementation is, in this example, also the server. To deploy the service, the application has to be started. All deployment action takes place in main().&lt;br /&gt;&lt;br /&gt;package simplermi.server;&lt;br /&gt;&lt;br /&gt;import java.rmi.AlreadyBoundException;&lt;br /&gt;import java.rmi.Remote;&lt;br /&gt;import java.rmi.RemoteException;&lt;br /&gt;import java.rmi.registry.LocateRegistry;&lt;br /&gt;import java.rmi.registry.Registry;&lt;br /&gt;import java.rmi.server.UnicastRemoteObject;&lt;br /&gt;&lt;br /&gt;import simplermi.SimpleServiceIfc;&lt;br /&gt;&lt;br /&gt;public class SimpleService extends UnicastRemoteObject&lt;br /&gt;implements SimpleServiceIfc {&lt;br /&gt;  public SimpleService(int port) throws RemoteException {&lt;br /&gt;    super(port);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public static void main(String[] args)&lt;br /&gt;  throws AlreadyBoundException, RemoteException {&lt;br /&gt;    // Create a RMI registry listening on port 4242.&lt;br /&gt;    Registry localRegistry = LocateRegistry.createRegistry(4242);&lt;br /&gt;    // Create an instance of the service listening on the same port.&lt;br /&gt;    SimpleServiceIfc service = new SimpleService(4242);&lt;br /&gt;    // Deploy the service.&lt;br /&gt;    localRegistry.bind("SimpleService", service);&lt;br /&gt;&lt;br /&gt;    // loop forever&lt;br /&gt;    while(true);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * The service routine.&lt;br /&gt;   */&lt;br /&gt;  public String request() throws RemoteException {&lt;br /&gt;    return "Hello, world!";&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Implement the Client [Top] &lt;br /&gt;&lt;br /&gt;The client just performs a lookup in the registry via the registry port, retrieves a service reference and calls the service routine.&lt;br /&gt;&lt;br /&gt;package simplermi.client;&lt;br /&gt;&lt;br /&gt;import java.net.MalformedURLException;&lt;br /&gt;import java.rmi.Naming;&lt;br /&gt;import java.rmi.NotBoundException;&lt;br /&gt;import java.rmi.RemoteException;&lt;br /&gt;&lt;br /&gt;import simplermi.SimpleServiceIfc;&lt;br /&gt;&lt;br /&gt;public class SimpleClient {&lt;br /&gt;  public static void main(String[] args)&lt;br /&gt;  throws MalformedURLException, NotBoundException, RemoteException {&lt;br /&gt;    SimpleServiceIfc remoteService =&lt;br /&gt;      (SimpleServiceIfc) Naming.lookup("//localhost:4242/SimpleService");&lt;br /&gt;    System.out.println("Service returns: " + remoteService.request());&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Compile and Run [Top] &lt;br /&gt;&lt;br /&gt;Here are the steps that are necessary to actually execute the simple example. I assume the source files are stored in the appropriate directories (according to the package structure) and that the current working directory is the one containing the root of the package hierarchy, simplermi/.&lt;br /&gt;&lt;br /&gt;Compile the sources:&lt;br /&gt;$ javac simplermi/*.java&lt;br /&gt;$ javac simplermi/server/*.java&lt;br /&gt;$ javac simplermi/client/*.java &lt;br /&gt;Generate RMI stubs:&lt;br /&gt;$ rmic -v1.2 simplermi.server.SimpleService &lt;br /&gt;Start the service (in background):&lt;br /&gt;$ java simplermi.server.SimpleService &amp; &lt;br /&gt;Run the client:&lt;br /&gt;$ java simplermi.client.SimpleC&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114695290213892757?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114695290213892757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114695290213892757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114695290213892757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114695290213892757'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/05/rmi-without-registry.html' title='rmi without registry'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114600844536806200</id><published>2006-04-25T16:40:00.000-07:00</published><updated>2006-04-25T16:40:45.720-07:00</updated><title type='text'>java NIO</title><content type='html'>http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/hunter_j2se1.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114600844536806200?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114600844536806200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114600844536806200' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114600844536806200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114600844536806200'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/java-nio.html' title='java NIO'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114590021781813830</id><published>2006-04-24T10:36:00.000-07:00</published><updated>2006-04-24T10:37:16.353-07:00</updated><title type='text'>intercept linux call LD_PRELOAD</title><content type='html'>Linux Function Interception - LD_PRELOADLinux Function Interception - LD_PRELOAD. Author: Austin Godber - created with KPresenter.&lt;br /&gt;uberhip.com/godber/interception/html/slide_5.html - 2k - Cached - Similar pages&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114590021781813830?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114590021781813830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114590021781813830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114590021781813830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114590021781813830'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/intercept-linux-call-ldpreload.html' title='intercept linux call LD_PRELOAD'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114557894732414384</id><published>2006-04-20T17:22:00.000-07:00</published><updated>2006-04-20T17:22:27.696-07:00</updated><title type='text'>linux firewall thesis</title><content type='html'>http://www.ee.calpoly.edu/3comproject/masters-thesis/americoM.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114557894732414384?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114557894732414384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114557894732414384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114557894732414384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114557894732414384'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/linux-firewall-thesis.html' title='linux firewall thesis'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114482325171411213</id><published>2006-04-11T23:26:00.001-07:00</published><updated>2006-04-11T23:27:31.820-07:00</updated><title type='text'>garbage collection</title><content type='html'>http://www-128.ibm.com/developerworks/java/library/j-jtp10283/&lt;br /&gt;&lt;br /&gt;http://www-128.ibm.com/developerworks/java/library/j-jtp11253/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114482325171411213?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114482325171411213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114482325171411213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114482325171411213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114482325171411213'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/garbage-collection.html' title='garbage collection'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114482320188475216</id><published>2006-04-11T23:26:00.000-07:00</published><updated>2006-04-11T23:26:42.086-07:00</updated><title type='text'>correlation</title><content type='html'>http://www-128.ibm.com/developerworks/library/ac-acact/?ca=drs-t4605&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114482320188475216?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114482320188475216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114482320188475216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114482320188475216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114482320188475216'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/correlation.html' title='correlation'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114464458036473866</id><published>2006-04-09T21:49:00.000-07:00</published><updated>2006-04-09T21:49:40.636-07:00</updated><title type='text'>C++ tutorial</title><content type='html'>http://cplus.about.com/od/beginnerctutorial/l/aa072302f.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114464458036473866?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114464458036473866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114464458036473866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114464458036473866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114464458036473866'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/c-tutorial.html' title='C++ tutorial'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114413107255212712</id><published>2006-04-03T23:10:00.000-07:00</published><updated>2006-04-03T23:11:12.980-07:00</updated><title type='text'>javascript closure</title><content type='html'>http://jibbering.com/faq/faq_notes/closures.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114413107255212712?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114413107255212712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114413107255212712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114413107255212712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114413107255212712'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/javascript-closure.html' title='javascript closure'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114411421954303420</id><published>2006-04-03T18:29:00.000-07:00</published><updated>2006-04-03T18:35:06.693-07:00</updated><title type='text'>IE javascript memory leak</title><content type='html'>http://www.outofhanwell.com/ieleak/&lt;br /&gt;&lt;br /&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/ie_leak_patterns.asp&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114411421954303420?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114411421954303420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114411421954303420' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114411421954303420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114411421954303420'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/04/ie-javascript-memory-leak.html' title='IE javascript memory leak'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114356750652151175</id><published>2006-03-28T09:38:00.000-08:00</published><updated>2006-03-28T09:38:27.000-08:00</updated><title type='text'>digital video</title><content type='html'>http://www.idi.ntnu.no/grupper/su/publ/phd/sandstaa-thesis.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114356750652151175?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114356750652151175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114356750652151175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114356750652151175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114356750652151175'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/03/digital-video.html' title='digital video'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114272370240925652</id><published>2006-03-18T15:14:00.000-08:00</published><updated>2006-03-18T15:15:02.673-08:00</updated><title type='text'>linux kernel tutorial</title><content type='html'>http://bravo.ce.uniroma2.it/kernelhacking2006/lkh06_3_s.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114272370240925652?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114272370240925652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114272370240925652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114272370240925652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114272370240925652'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/03/linux-kernel-tutorial.html' title='linux kernel tutorial'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114133616785933385</id><published>2006-03-02T13:49:00.000-08:00</published><updated>2006-03-02T13:49:28.223-08:00</updated><title type='text'>ssl implementation</title><content type='html'>http://piglet.uccs.edu/~gsc/pub/master/gkgodava/doc/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114133616785933385?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114133616785933385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114133616785933385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114133616785933385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114133616785933385'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/03/ssl-implementation.html' title='ssl implementation'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114102097317694323</id><published>2006-02-26T22:15:00.000-08:00</published><updated>2006-02-26T22:19:45.493-08:00</updated><title type='text'>reverse engineering java from java to UML</title><content type='html'>C:\public\essmodel&lt;br /&gt;essmodel.sourceforge.net&lt;br /&gt;http://forum.java.sun.com/thread.jspa?threadID=443226&amp;messageID=2005619&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114102097317694323?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114102097317694323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114102097317694323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114102097317694323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114102097317694323'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/reverse-engineering-java-from-java-to.html' title='reverse engineering java from java to UML'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114101854805105929</id><published>2006-02-26T21:34:00.000-08:00</published><updated>2006-02-26T21:35:48.726-08:00</updated><title type='text'>wiki open source</title><content type='html'>http://www.onlamp.com/pub/a/onlamp/2004/11/04/which_wiki.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114101854805105929?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114101854805105929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114101854805105929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114101854805105929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114101854805105929'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/wiki-open-source.html' title='wiki open source'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114082648662172433</id><published>2006-02-24T16:14:00.000-08:00</published><updated>2006-02-24T16:14:46.903-08:00</updated><title type='text'>WSDM</title><content type='html'>http://www.globusworld.org/2005Slides/Session%206b(1).pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114082648662172433?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114082648662172433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114082648662172433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114082648662172433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114082648662172433'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/wsdm.html' title='WSDM'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114074065726972549</id><published>2006-02-23T16:23:00.000-08:00</published><updated>2006-02-23T16:24:17.730-08:00</updated><title type='text'>inner class</title><content type='html'>http://www.javaworld.com/javaworld/javaqa/2001-08/01-qa-0817-static.html&lt;br /&gt;&lt;br /&gt; this Q&amp;A I'll cover two popular and related questions: "What is the difference between an inner member class and an inner static member class?" And: "Why would I choose one over the other?"&lt;br /&gt;&lt;br /&gt;Superficially, static and nonstatic inner member classes differ in how you declare them. A static member class will have the static keyword in its definition, while a member class will not:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class InnerClassSyntax {&lt;br /&gt;&lt;br /&gt;    // A static member class&lt;br /&gt;    public static class StaticMember {&lt;br /&gt;        // ... code&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    // A member class&lt;br /&gt;    public class Member {&lt;br /&gt;        // ... code&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More importantly, the static keyword limits what instances of the static member classes can do to instances of the class within which they are defined. To wit, when you declare a member class as static, instances of that inner class will have access only to the static methods and static members of the enclosing instance.&lt;br /&gt;&lt;br /&gt;In contrast, plain old member classes can access any method or member of the enclosing class since member classes have access to the enclosing instance's this. (A static member class is limited to accessing only static attributes because it lacks access to the enclosing instance's this.)&lt;br /&gt;&lt;br /&gt;Let's expand the original example to see these limitations in action:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class InnerClassSyntax {&lt;br /&gt;&lt;br /&gt;    private static int _aStaticInstanceVariable;&lt;br /&gt;    private        int _anInstanceVariable;&lt;br /&gt;    &lt;br /&gt;    public void anInstanceMethod() {&lt;br /&gt;        // ... do something&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public static void aStaticMethod() {&lt;br /&gt;        // ... do something&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    // A static member class&lt;br /&gt;    public static class StaticMember {&lt;br /&gt;        public void aMethod() {&lt;br /&gt;            // Legal calls&lt;br /&gt;            int staticValue = InnerClassSyntax._aStaticInstanceVariable;&lt;br /&gt;            InnerClassSyntax.aStaticMethod();&lt;br /&gt;            &lt;br /&gt;            // Illegal calls -- will not compile if uncommented&lt;br /&gt;            // int value = _anInstanceVariable;&lt;br /&gt;            // anInstanceMethod();&lt;br /&gt;            // InnerClassSyntax.anInstanceMethod();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    // A member class&lt;br /&gt;    public class Member {&lt;br /&gt;        public void aMethod() {&lt;br /&gt;            // Legal calls&lt;br /&gt;            int staticValue = _aStaticInstanceVariable;&lt;br /&gt;            int value       = _anInstanceVariable;&lt;br /&gt;            aStaticMethod();&lt;br /&gt;            anInstanceMethod();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You see that the static member class can access only those attributes declared as static. Static member classes do not have access to the this reference -- in this case InnerClassSyntax.this. However, Member instances do have access to InnerClassSyntax.this, so they can access everything in the enclosing InnerClassSyntax instance.&lt;br /&gt;&lt;br /&gt;The following code selection rewrites the Member class so that it explicitly uses the InnerClassSyntax.this reference (which normally happens by default):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public class Member {&lt;br /&gt;        public void aMethod() {&lt;br /&gt;            staticValue = InnerClassSyntax._aStaticInstanceVariable;&lt;br /&gt;            value = InnerClassSyntax.this._anInstanceVariable;&lt;br /&gt;            InnerClassSyntax.aStaticMethod();&lt;br /&gt;            InnerClassSyntax.this.anInstanceMethod();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, with all the syntactical goodies aside, why would you choose a static member class over a plain-old member class? Well, when designing an inner class, you need to ask what do that inner class's instances need? Ask yourself whether the instances depend on instance-specific information? If yes, you need a member class.&lt;br /&gt;&lt;br /&gt;However, nonstatic member classes must maintain a reference to the enclosing instance. Maintenance of this reference consumes both memory and CPU time. Therefore, if your member class does not depend upon the enclosing class's instance data, you can, and should, declare it static.&lt;br /&gt;&lt;br /&gt;Let's look at a static member class example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public final class Text {&lt;br /&gt;&lt;br /&gt;    // List of valid justification constants&lt;br /&gt;    public static final Justification LEFT =&lt;br /&gt;        new Justification( "Left" );&lt;br /&gt;    &lt;br /&gt;    public static final Justification RIGHT =&lt;br /&gt;        new Justification( "Right" );&lt;br /&gt;    &lt;br /&gt;    public static final Justification CENTER =&lt;br /&gt;        new Justification( "Center" );&lt;br /&gt;    &lt;br /&gt;    // Holder for this instance's justification&lt;br /&gt;    private Justification _justification;&lt;br /&gt;    &lt;br /&gt;    public void setJustification( Justification justification ) {&lt;br /&gt;        _justification = justification;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    // Other Text code omitted&lt;br /&gt;    // . . . &lt;br /&gt;    &lt;br /&gt;    public static class Justification {&lt;br /&gt;        &lt;br /&gt;        private String _label;&lt;br /&gt;        &lt;br /&gt;        public Justification( String label ) {&lt;br /&gt;            _label = label;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        public String toString() {&lt;br /&gt;            return _label;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the code above, instances of Text might represent selections of text inside an editor. The text can have a justification. I declared the Justification member class as static since the Justification instances do not rely on instance-level information in the enclosing Text class. Instead, instances of Justification act as constants that work with any instance of Text. That's why we can get away with declaring Justification static; it is independent of any specific Text instances.&lt;br /&gt;&lt;br /&gt;Now, let's look at a member class example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public final class Text {&lt;br /&gt;&lt;br /&gt;    private String _text;&lt;br /&gt;    private Search _search = new Search();&lt;br /&gt;    &lt;br /&gt;    public boolean contains( String text ) {&lt;br /&gt;        return _search.contains( text );&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    private class Search {&lt;br /&gt;        public boolean contains( String text ) {&lt;br /&gt;            // Do something to Text._text;&lt;br /&gt;            // Hardcode return so that this class can compile&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;        // ... other methods&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    // Original justification code removed for brevity&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this example, Text implements its searching code as a member class. (Such an approach nicely partitions the code, rather than embedding the search code within the Text class itself.) In order to search, the Search object needs access to Text.this._text, thus the Search must not be declared static.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114074065726972549?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114074065726972549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114074065726972549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114074065726972549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114074065726972549'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/inner-class.html' title='inner class'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114059061595815838</id><published>2006-02-21T22:43:00.000-08:00</published><updated>2006-02-21T22:43:36.220-08:00</updated><title type='text'>idiom</title><content type='html'>http://www.wayabroad.com/pack/pack02/1846_1_1.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114059061595815838?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114059061595815838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114059061595815838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114059061595815838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114059061595815838'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/idiom.html' title='idiom'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114057617994724541</id><published>2006-02-21T18:42:00.000-08:00</published><updated>2006-02-21T19:10:20.456-08:00</updated><title type='text'>certificate management</title><content type='html'>http://www.bo.infn.it/alice/introgrd/certmgr/certmgr.html&lt;br /&gt;http://forum.java.sun.com/thread.jspa?forumID=2&amp;messageID=449486&amp;threadID=154587&lt;br /&gt;&lt;br /&gt;How to export private key from keystore?&lt;br /&gt;Author: zendragon  Posts: 4   Registered: 12/5/97 &lt;br /&gt;  Jul 31, 2001 7:24 AM   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;I have the same problem as following&lt;br /&gt;&lt;br /&gt;Hi&lt;br /&gt;Does anybody know, how to export a private key from a keystore in a PEM-Encoded format, i.e. that is what openSSL for Apache is looking for.&lt;br /&gt;&lt;br /&gt;What I got until now from the Keystore (and that's very easy) is an instance of the Key-class of the Private Key. From that Key instance I can call the encoded()-method to get a PKCS8-encoded byte-array. Now, what I want to is a PEM-Encoded String.&lt;br /&gt;&lt;br /&gt;Any help greatly apreciated!&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: thaisontn  Posts: 1   Registered: 8/27/99 &lt;br /&gt;  Sep 13, 2002 6:24 PM (reply 1 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;I have the exact same issue. I have a certificate for a site that is incorporated in a Java keystore because the webserver is in Java. Now I want to migrate the site to a new setup (Apache/Tomcat) so I want to export the private key so that Apache/OpenSSL can use it. I've tried privKey.getEncoded()(which I assume is equivalent to OpenSSL's DER format) as well as Base64.encode(privKey.getEncoded()) (which I assume is equivalent to OpenSSL's PEM format). Neither of these approaches work. Am I missing something or is there a bug in the PKCS8EncodedKeySpec code or the OpenSSL code ? If anyone has any thoughts on this, I'd like to hear about it. Thanx !&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: jheiss  Posts: 3   Registered: 12/18/97 &lt;br /&gt;  Sep 30, 2002 9:37 AM (reply 2 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;You're on the right track. After Base64.encode(privKey.getEncoded()) you need&lt;br /&gt;to wrap the lines at 64 characters and add the header and footer lines (these are documented in OpenSSL's pkcs8 man page).&lt;br /&gt;&lt;br /&gt;-----BEGIN PRIVATE KEY-----&lt;br /&gt;-----END PRIVATE KEY-----&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: emoy2000  Posts: 1   Registered: 6/8/01 &lt;br /&gt;  Dec 30, 2002 11:25 PM (reply 3 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Hi, I have the same problem as what you mentioned here (which I don't know how to export private key from keystore), could you share your solution with me here? &lt;br /&gt;Thanks a lot&lt;br /&gt;Mana&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: amorrow5  Posts: 320   Registered: 8/27/01 &lt;br /&gt;  Jan 8, 2003 2:00 AM (reply 4 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is a full code example&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;// How to export the private key from keystore?&lt;br /&gt;// Does keytool not have an option to do so?&lt;br /&gt;// This example use the "testkeys" file that comes with JSSE 1.0.3&lt;br /&gt; &lt;br /&gt;import sun.misc.BASE64Encoder;&lt;br /&gt;import java.security.cert.Certificate;&lt;br /&gt;import java.security.*;&lt;br /&gt;import java.io.File;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt; &lt;br /&gt;class ExportPriv {&lt;br /&gt;    public static void main(String args[]) throws Exception{&lt;br /&gt; ExportPriv myep = new ExportPriv();&lt;br /&gt; myep.doit();&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    public void doit() throws Exception{&lt;br /&gt; &lt;br /&gt; KeyStore ks = KeyStore.getInstance("JKS");&lt;br /&gt; String fileName = "testkeys";&lt;br /&gt; &lt;br /&gt; char[] passPhrase = "passphrase".toCharArray();&lt;br /&gt; BASE64Encoder myB64 = new BASE64Encoder();&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; File certificateFile = new File(fileName);&lt;br /&gt; ks.load(new FileInputStream(certificateFile), passPhrase);&lt;br /&gt; &lt;br /&gt; KeyPair kp = getPrivateKey(ks, "duke", passPhrase);&lt;br /&gt;  &lt;br /&gt; PrivateKey privKey = kp.getPrivate();&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; String b64 = myB64.encode(privKey.getEncoded());&lt;br /&gt; &lt;br /&gt; System.out.println("-----BEGIN PRIVATE KEY-----");&lt;br /&gt; System.out.println(b64);&lt;br /&gt; System.out.println("-----END PRIVATE KEY-----");&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;// From http://javaalmanac.com/egs/java.security/GetKeyFromKs.html&lt;br /&gt; &lt;br /&gt;   public KeyPair getPrivateKey(KeyStore keystore, String alias, char[] password) {&lt;br /&gt;        try {&lt;br /&gt;            // Get private key&lt;br /&gt;            Key key = keystore.getKey(alias, password);&lt;br /&gt;            if (key instanceof PrivateKey) {&lt;br /&gt;                // Get certificate of public key&lt;br /&gt;                Certificate cert = keystore.getCertificate(alias);&lt;br /&gt;    &lt;br /&gt;                // Get public key&lt;br /&gt;                PublicKey publicKey = cert.getPublicKey();&lt;br /&gt;    &lt;br /&gt;                // Return a key pair&lt;br /&gt;                return new KeyPair(publicKey, (PrivateKey)key);&lt;br /&gt;            }&lt;br /&gt;        } catch (UnrecoverableKeyException e) {&lt;br /&gt;        } catch (NoSuchAlgorithmException e) {&lt;br /&gt;        } catch (KeyStoreException e) {&lt;br /&gt;        }&lt;br /&gt;        return null;&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;Re: How to export private key from keystore?&lt;br /&gt;Author: pchinns  Posts: 1   Registered: 10/8/00 &lt;br /&gt;  Mar 11, 2003 11:34 AM (reply 5 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Hi,&lt;br /&gt;&lt;br /&gt;I have a problem related to keystore and certificates. Can you please throw some light on this.&lt;br /&gt;&lt;br /&gt;JSSE expects two keystores one for loading the private keys and the other for loading public keys.&lt;br /&gt;&lt;br /&gt;I created a certificate request using java keytool and obtained a trial certificate from a trusted CA. I imported the CA's trial root and trial certificate into the keystore which was intially used to generate certificate request. I believe this can now be used as the keystore that contains the private key. Now how do i get the keystore which contains the public keys.&lt;br /&gt;&lt;br /&gt;Any help in this regard will be appreaciated&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;pradeep&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: lpz  Posts: 2   Registered: 9/25/98 &lt;br /&gt;  Mar 18, 2003 5:59 PM (reply 6 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;I have the opposite problem. How do you read in an encrypted private key from a PEM file? I can read in the public key certificate and get the public key, like this:&lt;br /&gt;&lt;br /&gt;FileInputStream is = new FileInputStream(file);&lt;br /&gt;CertificateFactory cf = CertificateFactory.getInstance("X.509");&lt;br /&gt;java.security.cert.Certificate cert = cf.generateCertificate(is);&lt;br /&gt;&lt;br /&gt;However, I cannot read in the private key and generate the private key:&lt;br /&gt;&lt;br /&gt;FileInputStream in = new FileInputStream(file);&lt;br /&gt;fileLength = (int) in.available();&lt;br /&gt;byte[] base64Bytes = new byte[fileLength];&lt;br /&gt;int inLength = in.read(base64Bytes, 0, fileLength);&lt;br /&gt;String inputString = new String(base64Bytes);&lt;br /&gt;&lt;br /&gt;// Here I tried all of the PEM file (including the ASCII armor) and just the base64 // characters. I get the same error either way&lt;br /&gt;String keyString = new String(base64KeyBytes);&lt;br /&gt;byte[]encryptedKeyBytes4 = Base64.decode(keyString);&lt;br /&gt;EncryptedPrivateKeyInfo encryptedKeyInfo = &lt;br /&gt;new EncryptedPrivateKeyInfo(encryptedKeyBytes);&lt;br /&gt;// This always throws IOException&lt;br /&gt;&lt;br /&gt;I have the same problem whether I use the java keystore or openssl to generate the key material.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: klmreddy  Posts: 1   Registered: 11/21/02 &lt;br /&gt;  Mar 22, 2003 6:25 AM (reply 7 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Hi ,&lt;br /&gt;&lt;br /&gt;this code is working fine , but it is not maintaining 64 char for each line.&lt;br /&gt;even if i made it 64 chars for line.this keyfile is not recognized by openssl.&lt;br /&gt;&lt;br /&gt;the following converts pem cert to pkcs12 certificate ,we need to specify the private&lt;br /&gt;key.&lt;br /&gt;&lt;br /&gt;openssl pkcs12 -export -out file_name.p12 -inkey userkey.pem -in usercert.pem&lt;br /&gt;&lt;br /&gt;I got the following error.&lt;br /&gt;&lt;br /&gt;Error loading private key&lt;br /&gt;15114:error:0D080071:asn1 encoding routines:d2i_ASN1_INTEGER:expecting an integer:a_int.c:204:&lt;br /&gt;15114:error:0D09D082:asn1 encoding routines:d2i_RSAPrivateKey:parsing:d2i_r_pr.c:117:&lt;br /&gt;15114:error:0D09B00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib:d2i_pr.c:89:&lt;br /&gt;15114:error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 lib:pem_lib.c:291: &lt;br /&gt;&lt;br /&gt;this means private key is not in correct format.can somebody help me.&lt;br /&gt;&lt;br /&gt;Thanks in advance,&lt;br /&gt;klm.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: amorrow5  Posts: 320   Registered: 8/27/01 &lt;br /&gt;  Jul 11, 2003 5:08 AM (reply 8 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It might be best to just try to dump out the the cert, rather than run your web server.&lt;br /&gt;&lt;br /&gt;To review, on the cert (and public key):&lt;br /&gt;&lt;br /&gt;keytool -export -rfc -keystore keyfile -alias duke &gt; duke.cert.pem&lt;br /&gt;&lt;br /&gt;openssl x509 -noout -text -in duke.cert.pem&lt;br /&gt;&lt;br /&gt;but for the private key, you run the program and send the output to a file, say duke.key.pem and then you can:&lt;br /&gt;&lt;br /&gt;openssl rsa -noout -text -in duke.key.pem&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that the starting delimiter line is simply &lt;br /&gt;&lt;br /&gt;"-----BEGIN PRIVATE KEY-----"&lt;br /&gt;&lt;br /&gt;but if you have a password-protected (encrypted) private key, the line will be more like:&lt;br /&gt;&lt;br /&gt;-----BEGIN RSA PRIVATE KEY-----&lt;br /&gt;Proc-Type: 4,ENCRYPTED&lt;br /&gt;DEK-Info: DES-EDE3-CBC,4ECDE43CCBDA9934&lt;br /&gt;&lt;br /&gt;I think Java, using JCE's DES, can decrypt such a file, but I have not tried to make an implementation of such.&lt;br /&gt;&lt;br /&gt;In thinking about it, I can understand who keytool does not provide the functionality my program does: the unencrypted private key becomes less secure when it is no longer protected by the keystore password.&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;Re: How to export private key from keystore?&lt;br /&gt;Author: alef-sun  Posts: 1   Registered: 6/6/03 &lt;br /&gt;  Oct 9, 2003 8:42 AM (reply 9 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Hi, I have used succesfully this code and the script:&lt;br /&gt;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.security.KeyStore;&lt;br /&gt;import java.security.Key;&lt;br /&gt; &lt;br /&gt;public class DumpPrivateKey {&lt;br /&gt;        static public void main(String[] args) {&lt;br /&gt;                try {&lt;br /&gt;                        KeyStore ks = KeyStore.getInstance("jks");&lt;br /&gt;                        ks.load(new FileInputStream("keystore"),&lt;br /&gt;                                 "password".toCharArray());&lt;br /&gt;                        Key key = ks.getKey("youralias",&lt;br /&gt;                                 "password".toCharArray());&lt;br /&gt;                        System.out.write(key.getEncoded());&lt;br /&gt;                } catch (Exception e) {&lt;br /&gt;                        e.printStackTrace();&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;ALIAS=youralias&lt;br /&gt;PKEY_8=privatekey.pkcs8&lt;br /&gt;PKEY_64=privatekey.b64&lt;br /&gt;CERT_64=certificate.b64&lt;br /&gt;CERT_12=certificate.p12&lt;br /&gt;keytool -alias ${ALIAS} -export -rfc &gt;${CERT_64}&lt;br /&gt;java DumpPrivateKey &gt;${PKEY_8}&lt;br /&gt;(echo "-----BEGIN PRIVATE KEY-----" ;&lt;br /&gt; openssl enc -in ${PKEY_8} -a;&lt;br /&gt; echo "-----END PRIVATE KEY-----") &gt;${PKEY_64}&lt;br /&gt;openssl pkcs12 -inkey ${PKEY_64} -in ${CERT_64} -out ${CERT_12} -export &lt;br /&gt;rm ${PKEY_8} ${PKEY_64} ${CERT_64}&lt;br /&gt;echo ${CERT_12}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope could be useful. Regards.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: evilb69  Posts: 182   Registered: 4/8/03 &lt;br /&gt;  Oct 13, 2003 1:26 AM (reply 10 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;LPZ... in answer to reading IN a private key into the keystore, see my answer here:-&lt;br /&gt;&lt;br /&gt;http://forum.java.sun.com/thread.jsp?forum=2&amp;thread=161578&amp;tstart=15&amp;trange=15&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: dwc_  Posts: 1   Registered: 2/27/04 &lt;br /&gt;  Feb 27, 2004 10:52 AM (reply 11 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Thanks for the posts. They were just what I was looking for.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: svangasse  Posts: 10   Registered: 3/21/03 &lt;br /&gt;  May 27, 2004 2:03 PM (reply 12 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;I'm very interested to see if anyone has managed to decrypt the (password protected) exported private key from a keystore.&lt;br /&gt;&lt;br /&gt;I took amorrow5's advice and looked into using the JCE with DES but if, as I did, you created your key pair using keytool you won't know what parameters to use when initialising the Cipher object which is used to decrypt the private key.&lt;br /&gt;&lt;br /&gt;I need the private key unencrypted to use with UW IMAP Mail Server.&lt;br /&gt;&lt;br /&gt;If anyone has any pointers they would be very much appreciated.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: rdare  Posts: 24   Registered: 9/2/99 &lt;br /&gt;  Aug 10, 2004 1:56 PM (reply 13 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using the cog-jglobus.jar and the BouncyCastle keyProvider classes, &lt;br /&gt;one can load a password protected PrivateKey .pem file as such:&lt;br /&gt;&lt;br /&gt;PrivateKey caPrivKey = null;&lt;br /&gt;String fileName = null; // .pem file path&lt;br /&gt;String caPassword = "some.password";&lt;br /&gt;try {&lt;br /&gt;// Now Generate the Cerificate&lt;br /&gt;// OpenSSLKey key = new BouncyCastleOpenSSLKey(fileName);&lt;br /&gt;OpenSSLKey key = new BouncyCastleOpenSSLKey(fileName);&lt;br /&gt;// decrypt ca priv key&lt;br /&gt;if (key.isEncrypted()) {&lt;br /&gt;try {&lt;br /&gt;if (caPassword == null) {&lt;br /&gt;throw new GeneralSecurityException(&lt;br /&gt;"A CA password is required");&lt;br /&gt;}&lt;br /&gt;key.decrypt(caPassword);&lt;br /&gt;} catch (GeneralSecurityException e) {&lt;br /&gt;System.out.println("Wrong CA password or other security error: "&lt;br /&gt;+ e.getMessage());&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;caPrivKey = key.getPrivateKey();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Re: How to export private key from keystore?&lt;br /&gt;Author: TJworld  Posts: 1   Registered: 1/4/05 &lt;br /&gt;  Jan 4, 2005 2:56 PM (reply 14 of 16)   &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Spurred on by the disparate articles and the code+script from alef-sun, I decided to put some tools together to make the job much easier, and to write a comprehensive illustrated guide to go with it, for Windows-based developers.&lt;br /&gt;&lt;br /&gt;Here's how to get and use a FREE trusted Thawte digital certificate to sign your Java JAR and Microsoft CAB code archives, to create trusted applets for downloading over the Internet, and to convert the Java JKS key-store to Microsoft PFX Personal Information Exchange format to share the same certificate with Java JAR files and Microsoft CAB files.&lt;br /&gt;&lt;br /&gt;Visit my guide "Trusted Code-Signing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114057617994724541?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114057617994724541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114057617994724541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114057617994724541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114057617994724541'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/certificate-management.html' title='certificate management'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114040227185267236</id><published>2006-02-19T18:23:00.000-08:00</published><updated>2006-02-19T18:24:32.370-08:00</updated><title type='text'>heartbeat</title><content type='html'>http://www-128.ibm.com/developerworks/linux/library/l-halinux/?ca=drs-&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114040227185267236?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114040227185267236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114040227185267236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114040227185267236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114040227185267236'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/heartbeat.html' title='heartbeat'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-114020570691781040</id><published>2006-02-17T11:47:00.000-08:00</published><updated>2006-02-17T11:48:27.173-08:00</updated><title type='text'>ssh no password</title><content type='html'>http://www.emsei.psu.edu/ecf/alt/general/ssh.html&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;Let's say you want to run a remote command on the machine "beta" from the machine "alpha" without supplying a password. Instead of authenticating using a password, you can use the command ssh-keygen to create a pair of public and private keys that can be used for authentication. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The first step is to create a set of public and private keys that uniquely identify your userid on "alpha". Log into alpha and run the command: &lt;br /&gt;alpha% ssh-keygen -t rsa -N '' &lt;br /&gt;&lt;br /&gt;(This command can take a long time to run on some machines). When it asks you what file you would like to save your key as, you can just press return, to accept the default location. This will create two files on alpha: &lt;br /&gt;&lt;br /&gt;alpha% ls -l /home/woods/.ssh/id*&lt;br /&gt;-rw-------   1 woods    woods         530 Feb  8 18:13 /home/woods/.ssh/id_rsa&lt;br /&gt;-rw-rw-r--   1 woods    woods         334 Feb  8 18:13 /home/woods/.ssh/id_rsa.pub&lt;br /&gt;The id_rsa file contains the private key (note that it is not world or group readable) that represents your identity on that particular machine. The private key should never be transferred from the machine or have its modes changed. The id_rsa.pub file is the public key, which is world-readable. ssh and other programs can use this key to encrypt messages that only you can decrypt using the private key. &lt;br /&gt;The -N '' argument to ssh-keygen specifies that there should be no password associated with these keys. Keys can have passwords just like accounts, but that would defeat the purpose here. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The next step is give alpha's public key to beta, and tell beta that alpha is authorized to run remote commands using RSA authentication. &lt;br /&gt;You do this by copying the contents of alpha's id_rsa.pub (not id_rsa!) to a file called authorized_keys2 in your .ssh directory on beta: &lt;br /&gt;&lt;br /&gt;beta% cd ~/.ssh&lt;br /&gt;beta% ssh alpha 'cat .ssh/id_rsa.pub' &gt;&gt; authorized_keys2&lt;br /&gt;alpha's public key is now in the authorized_keys2 file on beta, telling beta that alpha is authorized to use RSA authentication to log in. &lt;br /&gt;By the way, it's fine to have more than one key in the authorized_keys2 file, in case you need more than one host to be able to do RSA authentication to beta. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The last step is to make sure the authorized_keys2 file on beta has modes 600. This ensures that no one else can view this file. &lt;br /&gt;beta% chmod 600 authorized_keys2&lt;br /&gt;beta% ls -l authorized_keys &lt;br /&gt;-rw-------   1 woods    woods         662 Feb  8 18:04 .ssh/authorized_keys2&lt;br /&gt;The first command removes all of the bits for "group" and "world" permissions, making&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-114020570691781040?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/114020570691781040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=114020570691781040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114020570691781040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/114020570691781040'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/02/ssh-no-password.html' title='ssh no password'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113865756878967883</id><published>2006-01-30T13:45:00.000-08:00</published><updated>2006-01-30T13:46:09.103-08:00</updated><title type='text'>dynamic html javascript</title><content type='html'>http://catcode.com/domcontent/display/menus.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113865756878967883?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113865756878967883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113865756878967883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113865756878967883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113865756878967883'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/01/dynamic-html-javascript.html' title='dynamic html javascript'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113817319783699826</id><published>2006-01-24T23:12:00.000-08:00</published><updated>2006-01-24T23:13:18.250-08:00</updated><title type='text'>stty erase</title><content type='html'>bind '"\M-[3~":backward-delete-char'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113817319783699826?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113817319783699826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113817319783699826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113817319783699826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113817319783699826'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/01/stty-erase.html' title='stty erase'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113808278719874858</id><published>2006-01-23T22:04:00.000-08:00</published><updated>2006-01-23T22:06:27.553-08:00</updated><title type='text'>ajax toolkit</title><content type='html'>http://getahead.ltd.uk/dwr&lt;br /&gt;&lt;br /&gt;http://dojotoolkit.org/&lt;br /&gt;&lt;br /&gt;http://glm-ajax.sourceforge.net/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113808278719874858?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113808278719874858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113808278719874858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113808278719874858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113808278719874858'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/01/ajax-toolkit.html' title='ajax toolkit'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113722649643066287</id><published>2006-01-14T00:14:00.000-08:00</published><updated>2006-01-14T00:14:56.776-08:00</updated><title type='text'>Runtime.exec</title><content type='html'>http://www-128.ibm.com/developerworks/library/j-tiger09304.html?ca=dnt-540&lt;br /&gt;Taming Tiger: Get environment variables and invoke subprocesses&lt;br /&gt;When deprecated doesn't mean forever&lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;  Document options &lt;br /&gt;  Print this page&lt;br /&gt; &lt;br /&gt;  E-mail this page&lt;br /&gt; &lt;br /&gt;  Discuss&lt;br /&gt; &lt;br /&gt;  Sample code&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Rate this page &lt;br /&gt;  Help us improve this content&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Level: Introductory&lt;br /&gt;&lt;br /&gt;John Zukowski (jaz@zukowski.net), President, JZ Ventures, Inc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;30 Sep 2004&lt;br /&gt;&lt;br /&gt;Accessing platform-specific information hasn't always been easy. While you could certainly create processes with Runtime.exec(), dealing with differences across platforms to build parameter sets often led to headaches. In addition, the getenv() method of System has been deprecated since the beginning of Java programming time. Now, as columnist John Zukowski shows you, the new ProcessBuilder class makes accessing platform-specific information easier than ever. Share your thoughts on this article with the author and other readers in the accompanying discussion forum. (You can also click Discuss at the top or bottom of the article to access the forum.) &lt;br /&gt;When is a deprecated method not deprecated? When you're using the getenv() method of System. Working in the pre-release versions of the original Java platform back in 1995, Tiger undeprecates the method, along with offering a new class called ProcessBuilder (in the java.lang package) for creating and interacting with system processes.&lt;br /&gt;&lt;br /&gt;Getting environment variables&lt;br /&gt;&lt;br /&gt;While I personally don't want to go back to the original event model for working with AWT components, one nice feature of the early access version of the Java platform (also known as the alpha releases) was the ability to access environment variables. This approach went against the "Write Once, Run Anywhere" mantra of the time, and the getenv() method of System was deprecated with the 1.0 release of the Java platform. Why something came out deprecated in a 1.0 release always confused me, but seeing the method there always seemed to spark interest in using it with new developers. Fast forward to 2004 and now you finally can. As Listing 1 shows, usage of the method is easy:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 1. Calling getenv&lt;br /&gt;&lt;br /&gt;public class EnvTest {&lt;br /&gt;  public static void main(String args[]) {&lt;br /&gt;    System.out.println(System.getenv(args[0]));&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Simply provide the name on the command line, pass it along to the getenv call, and you'll get its current value. For instance, calling with a PROCESSOR_IDENTIFIER argument produces the results in Listing 2 for my two-year-old desktop system:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 2. getenv sample output&lt;br /&gt;&lt;br /&gt;  java EnvTest PROCESSOR_IDENTIFIER&lt;br /&gt; x86 Family 6 Model 8 Stepping 6, GenuineIntel&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The first thing you should notice is that the method name, getenv(), is all lowercase, not mixed case as you might expect (getEnv()). The reason is because that's the way it was originally named back in pre-release days. Second, accessing environment variables tends to result in platform-specific code. That's all right if it is what you truly want, but it strays from the 100 percent Pure Java model. The code itself is still 100 percent pure, so using the method doesn't totally go against the principle, but after using system properties for so many years, having getenv() around just feels wrong.&lt;br /&gt;&lt;br /&gt;Tiger offers two versions of the getenv() method, not just one. The second version returns a name-value pair mapping of all the environment variables currently set in the system. Listing 3 demonstrates the usage of this new method by printing out the key and value of all environment variables:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 3. Getting all environment variables&lt;br /&gt;&lt;br /&gt;import java.util.Map;&lt;br /&gt;&lt;br /&gt;public class EnvDump {&lt;br /&gt;  public static void main(String args[]) {&lt;br /&gt;    for (Map.Entry entry: System.getenv().entrySet()) {&lt;br /&gt;      System.out.println(entry.getKey() + " / " +&lt;br /&gt;        entry.getValue());&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; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Understanding ProcessBuilder&lt;br /&gt;&lt;br /&gt;This leads us to the new class, java.lang.ProcessBuilder. Earlier versions of the platform allowed you to create native processes through the exec() method of the Runtime class. This approach still works, but with just String arrays as arguments, and a File argument for a working directory, the manner of customizing the sub-process wasn't always that easy. The use of ProcessBuilder simplifies things by adding methods like directory(File) to change the working directory for the process and environment() for adding and removing environment variables from the process space. Listing 4 shows a simple usage of ProcessBuilder to get your Internet configuration with the ipconfig command. This approach should work on most platforms. If it doesn't, change ipconfig to a working command for your platform. After starting the process builder, you need to get its InputStream to read the results of the created process.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 4. Using ProcessBuilder&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class ProcessTest {&lt;br /&gt;  public static void main(String args[]) throws IOException {&lt;br /&gt;    Process p = new ProcessBuilder("ipconfig").start();&lt;br /&gt;    InputStream is = p.getInputStream();&lt;br /&gt;    BufferedReader br = new BufferedReader(new InputStreamReader(is));&lt;br /&gt;    String line;&lt;br /&gt;    while ((line = br.readLine()) != null) {&lt;br /&gt;     System.out.println(line);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As Listing 5 shows, running this program produces output similar to running ipconfig from the command line (your results will most likely vary):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listing 5. ProcessBuilder example output&lt;br /&gt;&lt;br /&gt;Windows 2000 IP Configuration&lt;br /&gt;&lt;br /&gt;Ethernet adapter Local Area Connection:&lt;br /&gt;&lt;br /&gt;        Connection-specific DNS Suffix  . :&lt;br /&gt;        IP Address. . . . . . . . . . . . : 192.168.0.101&lt;br /&gt;        Subnet Mask . . . . . . . . . . . : 255.255.255.0&lt;br /&gt;        Default Gateway . . . . . . . . . : 192.168.0.1&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As I already mentioned, the ProcessBuilder class is a bit more than just forking off a process and getting the results. Prior to calling its start() method, you can adjust the context for the process to execute in. Don't like the environment variables? Just get the current set with environment and clear() out the map. Need to add an environment variable? Call environment to get the current set, then put(name, value) in a new variable. Don't like the working directory? Call directory() with a new working directory as a File object. It really is that simple. Create the ProcessBuilder with a variable number of string arguments representing the command to run and that command's arguments. Once the ProcessBuilder is configured with new environment variables and a working directory, just call start() for the command to run.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ask and ye shall receive...maybe&lt;br /&gt;&lt;br /&gt;Are you concerned that your favorite method got deprecated and you want it back? Well, sometimes a deprecated method that was never really supported in a released Java version can come back to life. With enough user demand and votes in Sun's Bug Parade, developers can make a difference and direct how the Java platform evolves. While I doubt the old AWT event model will ever come back to life -- even if everyone demanded it -- something as simple as getting an environment variable is finally supported by the Java platform. Use it with care. Apart from the deprecated getenv issue, ProcessBuilder adds a simpler manner of creating native processes and should be used to replace any old Runtime.exec() calls. Refactor away!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Back to top &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Download&lt;br /&gt;&lt;br /&gt;Name Size Download method &lt;br /&gt;j-tiger09304-source.zip  FTP &lt;br /&gt; &lt;br /&gt; Information about download methods&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113722649643066287?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113722649643066287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113722649643066287' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113722649643066287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113722649643066287'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/01/runtimeexec.html' title='Runtime.exec'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113668058357990661</id><published>2006-01-07T16:35:00.000-08:00</published><updated>2006-01-07T16:38:00.890-08:00</updated><title type='text'>javascript OOP</title><content type='html'>http://www.javascriptkit.com/javatutors/oopjs.shtml&lt;br /&gt;&lt;br /&gt;JavaScript and Object Oriented Programming (OOP)&lt;br /&gt;Credits: This tutorial is written and contributed by Tim Scarfe. Edited by JavaScriptKit.com for content/ structure. Please see footnote for more information on author.&lt;br /&gt;&lt;br /&gt;JavaScript is an excellent language to write object oriented web applications. It can support OOP because it supports inheritance through prototyping as well as properties and methods. Many developers cast off JS as a suitable OOP language because they are so used to the class style of C# and Java. Many people don't realize that JavaScript supports inheritance. When you write object-oriented code it instantly gives you power; you can write code that can be re-used and that is encapsulated.&lt;br /&gt;&lt;br /&gt; What's so great about objects?&lt;br /&gt;Objects work so well because they act just like real life objects- objects have properties and methods. So if we were talking about a lamp, a property of it may be its height or width, say 12cm. A method of it may be to shine (an action). And when it's shining, its brightness property would be of a greater value than when it wasn't.&lt;br /&gt;&lt;br /&gt;JavaScript gives you the ability to make your own objects for your own applications. With your objects you can code in events that fire when you want them to, and the code is encapsulated. It can be initialized any amount of times.&lt;br /&gt;&lt;br /&gt; Creating objects using new Object()&lt;br /&gt;There are several ways to create objects in JavaScript, and all of them have their place. The simplest way is to use the new operator, specifically, new Object():&lt;br /&gt;&lt;br /&gt;&lt;&lt;br /&gt;person = new Object()&lt;br /&gt;person.name = "Tim Scarfe"&lt;br /&gt;person.height = "6Ft"&lt;br /&gt;&lt;br /&gt;person.run = function() {&lt;br /&gt; this.state = "running"&lt;br /&gt; this.speed = "4ms^-1"&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//--&gt;&lt;br /&gt;We define a custom object "person," then add to it its own properties and method afterwards. In this case, the custom method merely initializes two more properties.&lt;br /&gt;&lt;br /&gt; Creating objects using Literal Notation&lt;br /&gt;Another inline way of defining an object is via literal notation. Supported in JavaScript1.2 and above, it's a more robust form of creating an object on the fly: &lt;br /&gt;&lt;br /&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;// Object Literals&lt;br /&gt;&lt;br /&gt;timObject = {&lt;br /&gt; property1 : "Hello",&lt;br /&gt; property2 : "MmmMMm",&lt;br /&gt; property3 : ["mmm", 2, 3, 6, "kkk"],&lt;br /&gt; method1 : function(){alert("Method had been called" + this.property1)}&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;timObject.method1();&lt;br /&gt;alert(timObject.property3[2]) // will yield 3&lt;br /&gt;&lt;br /&gt;var circle = { x : 0, y : 0, radius: 2 } // another example&lt;br /&gt;&lt;br /&gt;// nesting is no problem.&lt;br /&gt;var rectangle = { &lt;br /&gt; upperLeft : { x : 2, y : 2 },&lt;br /&gt; lowerRight : { x : 4, y : 4}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;alert(rectangle.upperLeft.x) // will yield 2&lt;br /&gt;&lt;br /&gt;//--&gt;&lt;br /&gt;Literal notion can contain arrays or arbitrary JavaScript expressions or values.&lt;br /&gt;&lt;br /&gt;While using the new operator or literal notion to create a custom object is both simple and logical, the biggest shortcoming is that the result is NOT reusable- we cannot easily initialize different versions of the created object. For example with the first demonstration above, if the person's name is not "Tim Scarfe", we would need to redefine our entire object just to accommodate this change.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113668058357990661?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113668058357990661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113668058357990661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113668058357990661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113668058357990661'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/01/javascript-oop.html' title='javascript OOP'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113652425387133852</id><published>2006-01-05T21:10:00.000-08:00</published><updated>2006-01-05T21:11:32.700-08:00</updated><title type='text'>turn off validation</title><content type='html'>It doesn't "validate" against the dtd if you tell it not to.  It does&lt;br /&gt;still&lt;br /&gt;parse the dtd, parse entities, load default attribute values etc.&lt;br /&gt;because&lt;br /&gt;that's what dtd's are for.  Certain parser flags may be available for&lt;br /&gt;certain&lt;br /&gt;parsers to limit this somewhat, but that's beyond what jdom has any&lt;br /&gt;control&lt;br /&gt;over.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here's an example of setting Xerces to not validate w/ external DTD:&lt;br /&gt;&lt;br /&gt;    ...&lt;br /&gt;    SAXBuilder builder = new SAXBuilder();&lt;br /&gt; &lt;br /&gt;builder.setFeature("http://apache.org/xml/features/nonvalidating/load-ex&lt;br /&gt;ternal-dtd", false);&lt;br /&gt;    ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113652425387133852?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113652425387133852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113652425387133852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113652425387133852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113652425387133852'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/01/turn-off-validation.html' title='turn off validation'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113632300053366571</id><published>2006-01-03T13:14:00.000-08:00</published><updated>2006-01-03T13:16:40.790-08:00</updated><title type='text'>video capture screen capture</title><content type='html'>PGUIRobot http://sourceforge.net/projects/pguirobot/&lt;br /&gt;&lt;br /&gt;java.awt.Robot&lt;br /&gt;&lt;br /&gt;camstudio&lt;br /&gt;&lt;br /&gt;http://graphicssoft.about.com/od/screenrecorders/&lt;br /&gt;&lt;br /&gt;http://www.openqa.org/selenium/documentation.action&lt;br /&gt;&lt;br /&gt;The above is QA GUI testing tool&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113632300053366571?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113632300053366571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113632300053366571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113632300053366571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113632300053366571'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2006/01/video-capture-screen-capture.html' title='video capture screen capture'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113564486314298755</id><published>2005-12-26T16:53:00.000-08:00</published><updated>2005-12-26T16:54:23.563-08:00</updated><title type='text'>cisco open source tool</title><content type='html'>http://cosi-nms.sourceforge.net/alpha-progs.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113564486314298755?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113564486314298755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113564486314298755' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113564486314298755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113564486314298755'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/12/cisco-open-source-tool.html' title='cisco open source tool'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113549487674443972</id><published>2005-12-24T23:13:00.000-08:00</published><updated>2005-12-24T23:14:36.970-08:00</updated><title type='text'>java Runtime.exec problem</title><content type='html'>http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html&lt;br /&gt;&lt;br /&gt;Java Traps &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When Runtime.exec() won't &lt;br /&gt;Navigate yourself around pitfalls related to the Runtime.exec() method&lt;br /&gt;&lt;br /&gt;Summary&lt;br /&gt;In this installment of Java Traps, Michael Daconta discusses one new pitfall and revisits another from his previous column. Originating in the java.lang package, the pitfall specifically involves problems with the Runtime.exec() method. Daconta also corrects an error from Pitfall 3 and offers a simpler solution. (2,500 words) &lt;br /&gt;By Michael C. Daconta &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;s part of the Java language, the java.lang package is implicitly imported into every Java program. This package's pitfalls surface often, affecting most programmers. This month, I'll discuss the traps lurking in the Runtime.exec() method.&lt;br /&gt;&lt;br /&gt;Pitfall 4: When Runtime.exec() won't&lt;br /&gt;The class java.lang.Runtime features a static method called getRuntime(), which retrieves the current Java Runtime Environment. That is the only way to obtain a reference to the Runtime object. With that reference, you can run external programs by invoking the Runtime class's exec() method. Developers often call this method to launch a browser for displaying a help page in HTML. &lt;br /&gt;&lt;br /&gt;There are four overloaded versions of the exec() command: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public Process exec(String command); &lt;br /&gt;&lt;br /&gt;public Process exec(String [] cmdArray); &lt;br /&gt;&lt;br /&gt;public Process exec(String command, String [] envp); &lt;br /&gt;&lt;br /&gt;public Process exec(String [] cmdArray, String [] envp); &lt;br /&gt;&lt;br /&gt;For each of these methods, a command -- and possibly a set of arguments -- is passed to an operating-system-specific function call. This subsequently creates an operating-system-specific process (a running program) with a reference to a Process class returned to the Java VM. The Process class is an abstract class, because a specific subclass of Process exists for each operating system. &lt;br /&gt;&lt;br /&gt;You can pass three possible input parameters into these methods:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A single string that represents both the program to execute and any arguments to that program&lt;br /&gt;&lt;br /&gt;An array of strings that separate the program from its arguments&lt;br /&gt;&lt;br /&gt;An array of environment variables&lt;br /&gt;&lt;br /&gt;Pass in the environment variables in the form name=value. If you use the version of exec() with a single string for both the program and its arguments, note that the string is parsed using white space as the delimiter via the StringTokenizer class.&lt;br /&gt;&lt;br /&gt;Stumbling into an IllegalThreadStateException &lt;br /&gt;The first pitfall relating to Runtime.exec() is the IllegalThreadStateException. The prevalent first test of an API is to code its most obvious methods. For example, to execute a process that is external to the Java VM, we use the exec() method. To see the value that the external process returns, we use the exitValue() method on the Process class. In our first example, we will attempt to execute the Java compiler (javac.exe): &lt;br /&gt;&lt;br /&gt;Listing 4.1 BadExecJavac.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class BadExecJavac&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {            &lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            Process proc = rt.exec("javac");&lt;br /&gt;            int exitVal = proc.exitValue();&lt;br /&gt;            System.out.println("Process exitValue: " + exitVal);&lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A run of BadExecJavac produces:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java BadExecJavac&lt;br /&gt;java.lang.IllegalThreadStateException: process has not exited&lt;br /&gt;        at java.lang.Win32Process.exitValue(Native Method)&lt;br /&gt;        at BadExecJavac.main(BadExecJavac.java:13)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If an external process has not yet completed, the exitValue() method will throw an IllegalThreadStateException; that's why this program failed. While the documentation states this fact, why can't this method wait until it can give a valid answer? &lt;br /&gt;&lt;br /&gt;A more thorough look at the methods available in the Process class reveals a waitFor() method that does precisely that. In fact, waitFor() also returns the exit value, which means that you would not use exitValue() and waitFor() in conjunction with each other, but rather would choose one or the other. The only possible time you would use exitValue() instead of waitFor() would be when you don't want your program to block waiting on an external process that may never complete. Instead of using the waitFor() method, I would prefer passing a boolean parameter called waitFor into the exitValue() method to determine whether or not the current thread should wait. A boolean would be more beneficial because exitValue() is a more appropriate name for this method, and it isn't necessary for two methods to perform the same function under different conditions. Such simple condition discrimination is the domain of an input parameter.&lt;br /&gt;&lt;br /&gt;Therefore, to avoid this trap, either catch the IllegalThreadStateException or wait for the process to complete. &lt;br /&gt;&lt;br /&gt;Now, let's fix the problem in Listing 4.1 and wait for the process to complete. In Listing 4.2, the program again attempts to execute javac.exe and then waits for the external process to complete:&lt;br /&gt;&lt;br /&gt;Listing 4.2 BadExecJavac2.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class BadExecJavac2&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {            &lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            Process proc = rt.exec("javac");&lt;br /&gt;            int exitVal = proc.waitFor();&lt;br /&gt;            System.out.println("Process exitValue: " + exitVal);&lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, a run of BadExecJavac2 produces no output. The program hangs and never completes. Why does the javac process never complete? &lt;br /&gt;&lt;br /&gt;Why Runtime.exec() hangs&lt;br /&gt;The JDK's Javadoc documentation provides the answer to this question:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Is this just a case of programmers not reading the documentation, as implied in the oft-quoted advice: read the fine manual (RTFM)? The answer is partially yes. In this case, reading the Javadoc would get you halfway there; it explains that you need to handle the streams to your external process, but it does not tell you how. &lt;br /&gt;&lt;br /&gt;Another variable is at play here, as is evident by the large number of programmer questions and misconceptions concerning this API in the newsgroups: though Runtime.exec() and the Process APIs seem extremely simple, that simplicity is deceiving because the simple, or obvious, use of the API is prone to error. The lesson here for the API designer is to reserve simple APIs for simple operations. Operations prone to complexities and platform-specific dependencies should reflect the domain accurately. It is possible for an abstraction to be carried too far. The JConfig library provides an example of a more complete API to handle file and process operations (see Resources below for more information). &lt;br /&gt;&lt;br /&gt;Now, let's follow the JDK documentation and handle the output of the javac process. When you run javac without any arguments, it produces a set of usage statements that describe how to run the program and the meaning of all the available program options. Knowing that this is going to the stderr stream, you can easily write a program to exhaust that stream before waiting for the process to exit. Listing 4.3 completes that task. While this approach will work, it is not a good general solution. Thus, Listing 4.3's program is named MediocreExecJavac; it provides only a mediocre solution. A better solution would empty both the standard error stream and the standard output stream. And the best solution would empty these streams simultaneously (I'll demonstrate that later).&lt;br /&gt;&lt;br /&gt;Listing 4.3 MediocreExecJavac.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class MediocreExecJavac&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {            &lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            Process proc = rt.exec("javac");&lt;br /&gt;            InputStream stderr = proc.getErrorStream();&lt;br /&gt;            InputStreamReader isr = new InputStreamReader(stderr);&lt;br /&gt;            BufferedReader br = new BufferedReader(isr);&lt;br /&gt;            String line = null;&lt;br /&gt;            System.out.println("&lt;ERROR&gt;");&lt;br /&gt;            while ( (line = br.readLine()) != null)&lt;br /&gt;                System.out.println(line);&lt;br /&gt;            System.out.println("&lt;/ERROR&gt;");&lt;br /&gt;            int exitVal = proc.waitFor();&lt;br /&gt;            System.out.println("Process exitValue: " + exitVal);&lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A run of MediocreExecJavac generates:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java MediocreExecJavac&lt;br /&gt;&lt;ERROR&gt;&lt;br /&gt;Usage: javac &lt;options&gt; &lt;source files&gt;&lt;br /&gt;&lt;br /&gt;where &lt;options&gt; includes:&lt;br /&gt;  -g                     Generate all debugging info&lt;br /&gt;  -g:none                Generate no debugging info&lt;br /&gt;  -g:{lines,vars,source} Generate only some debugging info&lt;br /&gt;  -O                     Optimize; may hinder debugging or enlarge class files&lt;br /&gt;  -nowarn                Generate no warnings&lt;br /&gt;  -verbose               Output messages about what the compiler is doing&lt;br /&gt;  -deprecation           Output source locations where deprecated APIs are used&lt;br /&gt;  -classpath &lt;path&gt;      Specify where to find user class files&lt;br /&gt;  -sourcepath &lt;path&gt;     Specify where to find input source files&lt;br /&gt;  -bootclasspath &lt;path&gt;  Override location of bootstrap class files&lt;br /&gt;  -extdirs &lt;dirs&gt;        Override location of installed extensions&lt;br /&gt;  -d &lt;directory&gt;         Specify where to place generated class files&lt;br /&gt;  -encoding &lt;encoding&gt;   Specify character encoding used by source files&lt;br /&gt;  -target &lt;release&gt;      Generate class files for specific VM version&lt;br /&gt;&lt;/ERROR&gt;&lt;br /&gt;Process exitValue: 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, MediocreExecJavac works and produces an exit value of 2. Normally, an exit value of 0 indicates success; any nonzero value indicates an error. The meaning of these exit values depends on the particular operating system. A Win32 error with a value of 2 is a "file not found" error. That makes sense, since javac expects us to follow the program with the source code file to compile. &lt;br /&gt;&lt;br /&gt;Thus, to circumvent the second pitfall -- hanging forever in Runtime.exec() -- if the program you launch produces output or expects input, ensure that you process the input and output streams. &lt;br /&gt;&lt;br /&gt;Assuming a command is an executable program&lt;br /&gt;Under the Windows operating system, many new programmers stumble upon Runtime.exec() when trying to use it for nonexecutable commands like dir and copy. Subsequently, they run into Runtime.exec()'s third pitfall. Listing 4.4 demonstrates exactly that:&lt;br /&gt;&lt;br /&gt;Listing 4.4 BadExecWinDir.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class BadExecWinDir&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {            &lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            Process proc = rt.exec("dir");&lt;br /&gt;            InputStream stdin = proc.getInputStream();&lt;br /&gt;            InputStreamReader isr = new InputStreamReader(stdin);&lt;br /&gt;            BufferedReader br = new BufferedReader(isr);&lt;br /&gt;            String line = null;&lt;br /&gt;            System.out.println("&lt;OUTPUT&gt;");&lt;br /&gt;            while ( (line = br.readLine()) != null)&lt;br /&gt;                System.out.println(line);&lt;br /&gt;            System.out.println("&lt;/OUTPUT&gt;");&lt;br /&gt;            int exitVal = proc.waitFor();            &lt;br /&gt;            System.out.println("Process exitValue: " + exitVal);&lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A run of BadExecWinDir produces:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java BadExecWinDir&lt;br /&gt;java.io.IOException: CreateProcess: dir error=2&lt;br /&gt;        at java.lang.Win32Process.create(Native Method)&lt;br /&gt;        at java.lang.Win32Process.&lt;init&gt;(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.execInternal(Native Method)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at BadExecWinDir.main(BadExecWinDir.java:12)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As stated earlier, the error value of 2 means "file not found," which, in this case, means that the executable named dir.exe could not be found. That's because the directory command is part of the Windows command interpreter and not a separate executable. To run the Windows command interpreter, execute either command.com or cmd.exe, depending on the Windows operating system you use. Listing 4.5 runs a copy of the Windows command interpreter and then executes the user-supplied command (e.g., dir).&lt;br /&gt;&lt;br /&gt;Listing 4.5 GoodWindowsExec.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;class StreamGobbler extends Thread&lt;br /&gt;{&lt;br /&gt;    InputStream is;&lt;br /&gt;    String type;&lt;br /&gt;    &lt;br /&gt;    StreamGobbler(InputStream is, String type)&lt;br /&gt;    {&lt;br /&gt;        this.is = is;&lt;br /&gt;        this.type = type;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void run()&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            InputStreamReader isr = new InputStreamReader(is);&lt;br /&gt;            BufferedReader br = new BufferedReader(isr);&lt;br /&gt;            String line=null;&lt;br /&gt;            while ( (line = br.readLine()) != null)&lt;br /&gt;                System.out.println(type + "&gt;" + line);    &lt;br /&gt;            } catch (IOException ioe)&lt;br /&gt;              {&lt;br /&gt;                ioe.printStackTrace();  &lt;br /&gt;              }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class GoodWindowsExec&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        if (args.length &lt; 1)&lt;br /&gt;        {&lt;br /&gt;            System.out.println("USAGE: java GoodWindowsExec &lt;cmd&gt;");&lt;br /&gt;            System.exit(1);&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        try&lt;br /&gt;        {            &lt;br /&gt;            String osName = System.getProperty("os.name" );&lt;br /&gt;            String[] cmd = new String[3];&lt;br /&gt;&lt;br /&gt;            if( osName.equals( "Windows NT" ) )&lt;br /&gt;            {&lt;br /&gt;                cmd[0] = "cmd.exe" ;&lt;br /&gt;                cmd[1] = "/C" ;&lt;br /&gt;                cmd[2] = args[0];&lt;br /&gt;            }&lt;br /&gt;            else if( osName.equals( "Windows 95" ) )&lt;br /&gt;            {&lt;br /&gt;                cmd[0] = "command.com" ;&lt;br /&gt;                cmd[1] = "/C" ;&lt;br /&gt;                cmd[2] = args[0];&lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            System.out.println("Execing " + cmd[0] + " " + cmd[1] &lt;br /&gt;                               + " " + cmd[2]);&lt;br /&gt;            Process proc = rt.exec(cmd);&lt;br /&gt;            // any error message?&lt;br /&gt;            StreamGobbler errorGobbler = new &lt;br /&gt;                StreamGobbler(proc.getErrorStream(), "ERROR");            &lt;br /&gt;            &lt;br /&gt;            // any output?&lt;br /&gt;            StreamGobbler outputGobbler = new &lt;br /&gt;                StreamGobbler(proc.getInputStream(), "OUTPUT");&lt;br /&gt;                &lt;br /&gt;            // kick them off&lt;br /&gt;            errorGobbler.start();&lt;br /&gt;            outputGobbler.start();&lt;br /&gt;                                    &lt;br /&gt;            // any error???&lt;br /&gt;            int exitVal = proc.waitFor();&lt;br /&gt;            System.out.println("ExitValue: " + exitVal);        &lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running GoodWindowsExec with the dir command generates:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java GoodWindowsExec "dir *.java"&lt;br /&gt;Execing cmd.exe /C dir *.java&lt;br /&gt;OUTPUT&gt; Volume in drive E has no label.&lt;br /&gt;OUTPUT&gt; Volume Serial Number is 5C5F-0CC9&lt;br /&gt;OUTPUT&gt;&lt;br /&gt;OUTPUT&gt; Directory of E:\classes\com\javaworld\jpitfalls\article2&lt;br /&gt;OUTPUT&gt;&lt;br /&gt;OUTPUT&gt;10/23/00  09:01p                   805 BadExecBrowser.java&lt;br /&gt;OUTPUT&gt;10/22/00  09:35a                   770 BadExecBrowser1.java&lt;br /&gt;OUTPUT&gt;10/24/00  08:45p                   488 BadExecJavac.java&lt;br /&gt;OUTPUT&gt;10/24/00  08:46p                   519 BadExecJavac2.java&lt;br /&gt;OUTPUT&gt;10/24/00  09:13p                   930 BadExecWinDir.java&lt;br /&gt;OUTPUT&gt;10/22/00  09:21a                 2,282 BadURLPost.java&lt;br /&gt;OUTPUT&gt;10/22/00  09:20a                 2,273 BadURLPost1.java&lt;br /&gt;... (some output omitted for brevity)&lt;br /&gt;OUTPUT&gt;10/12/00  09:29p                   151 SuperFrame.java&lt;br /&gt;OUTPUT&gt;10/24/00  09:23p                 1,814 TestExec.java&lt;br /&gt;OUTPUT&gt;10/09/00  05:47p                23,543 TestStringReplace.java&lt;br /&gt;OUTPUT&gt;10/12/00  08:55p                   228 TopLevel.java&lt;br /&gt;OUTPUT&gt;              22 File(s)         46,661 bytes&lt;br /&gt;OUTPUT&gt;                         19,678,420,992 bytes free&lt;br /&gt;ExitValue: 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running GoodWindowsExec with any associated document type will launch the application associated with that document type. For example, to launch Microsoft Word to display a Word document (i.e., one with a .doc extension), type:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&gt;java GoodWindowsExec "yourdoc.doc"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Notice that GoodWindowsExec uses the os.name system property to determine which Windows operating system you are running -- and thus determine the appropriate command interpreter. After executing the command interpreter, handle the standard error and standard input streams with the StreamGobbler class. StreamGobbler empties any stream passed into it in a separate thread. The class uses a simple String type to denote the stream it empties when it prints the line just read to the console. &lt;br /&gt;&lt;br /&gt;Thus, to avoid the third pitfall related to Runtime.exec(), do not assume that a command is an executable program; know whether you are executing a standalone executable or an interpreted command. At the end of this section, I will demonstrate a simple command-line tool that will help you with that analysis.&lt;br /&gt;&lt;br /&gt;It is important to note that the method used to obtain a process's output stream is called getInputStream(). The thing to remember is that the API sees things from the perspective of the Java program and not the external process. Therefore, the external program's output is the Java program's input. And that logic carries over to the external program's input stream, which is an output stream to the Java program.&lt;br /&gt;&lt;br /&gt;Runtime.exec() is not a command line&lt;br /&gt;One final pitfall to cover with Runtime.exec() is mistakenly assuming that exec() accepts any String that your command line (or shell) accepts. Runtime.exec() is much more limited and not cross-platform. This pitfall is caused by users attempting to use the exec() method to accept a single String as a command line would. The confusion may be due to the fact that command is the parameter name for the exec() method. Thus, the programmer incorrectly associates the parameter command with anything that he or she can type on a command line, instead of associating it with a single program and its arguments. In listing 4.6 below, a user tries to execute a command and redirect its output in one call to exec():&lt;br /&gt;&lt;br /&gt;Listing 4.6 BadWinRedirect.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;// StreamGobbler omitted for brevity&lt;br /&gt;&lt;br /&gt;public class BadWinRedirect&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {            &lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            Process proc = rt.exec("java jecho 'Hello World' &gt; test.txt");&lt;br /&gt;            // any error message?&lt;br /&gt;            StreamGobbler errorGobbler = new &lt;br /&gt;                StreamGobbler(proc.getErrorStream(), "ERROR");            &lt;br /&gt;            &lt;br /&gt;            // any output?&lt;br /&gt;            StreamGobbler outputGobbler = new &lt;br /&gt;                StreamGobbler(proc.getInputStream(), "OUTPUT");&lt;br /&gt;                &lt;br /&gt;            // kick them off&lt;br /&gt;            errorGobbler.start();&lt;br /&gt;            outputGobbler.start();&lt;br /&gt;                                    &lt;br /&gt;            // any error???&lt;br /&gt;            int exitVal = proc.waitFor();&lt;br /&gt;            System.out.println("ExitValue: " + exitVal);        &lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running BadWinRedirect produces:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java BadWinRedirect&lt;br /&gt;OUTPUT&gt;'Hello World' &gt; test.txt&lt;br /&gt;ExitValue: 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The program BadWinRedirect attempted to redirect the output of an echo program's simple Java version into the file test.txt. However, we find that the file test.txt does not exist. The jecho program simply takes its command-line arguments and writes them to the standard output stream. (You will find the source for jecho in the source code available for download in Resources.) In Listing 4.6, the user assumed that you could redirect standard output into a file just as you could on a DOS command line. Nevertheless, you do not redirect the output through this approach. The incorrect assumption here is that the exec() method acts like a shell interpreter; it does not. Instead, exec() executes a single executable (a program or script). If you want to process the stream to either redirect it or pipe it into another program, you must do so programmatically, using the java.io package. Listing 4.7 properly redirects the standard output stream of the jecho process into a file.&lt;br /&gt;&lt;br /&gt;Listing 4.7 GoodWinRedirect.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;class StreamGobbler extends Thread&lt;br /&gt;{&lt;br /&gt;    InputStream is;&lt;br /&gt;    String type;&lt;br /&gt;    OutputStream os;&lt;br /&gt;    &lt;br /&gt;    StreamGobbler(InputStream is, String type)&lt;br /&gt;    {&lt;br /&gt;        this(is, type, null);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    StreamGobbler(InputStream is, String type, OutputStream redirect)&lt;br /&gt;    {&lt;br /&gt;        this.is = is;&lt;br /&gt;        this.type = type;&lt;br /&gt;        this.os = redirect;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void run()&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            PrintWriter pw = null;&lt;br /&gt;            if (os != null)&lt;br /&gt;                pw = new PrintWriter(os);&lt;br /&gt;                &lt;br /&gt;            InputStreamReader isr = new InputStreamReader(is);&lt;br /&gt;            BufferedReader br = new BufferedReader(isr);&lt;br /&gt;            String line=null;&lt;br /&gt;            while ( (line = br.readLine()) != null)&lt;br /&gt;            {&lt;br /&gt;                if (pw != null)&lt;br /&gt;                    pw.println(line);&lt;br /&gt;                System.out.println(type + "&gt;" + line);    &lt;br /&gt;            }&lt;br /&gt;            if (pw != null)&lt;br /&gt;                pw.flush();&lt;br /&gt;        } catch (IOException ioe)&lt;br /&gt;            {&lt;br /&gt;            ioe.printStackTrace();  &lt;br /&gt;            }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class GoodWinRedirect&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        if (args.length &lt; 1)&lt;br /&gt;        {&lt;br /&gt;            System.out.println("USAGE java GoodWinRedirect &lt;outputfile&gt;");&lt;br /&gt;            System.exit(1);&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        try&lt;br /&gt;        {            &lt;br /&gt;            FileOutputStream fos = new FileOutputStream(args[0]);&lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            Process proc = rt.exec("java jecho 'Hello World'");&lt;br /&gt;            // any error message?&lt;br /&gt;            StreamGobbler errorGobbler = new &lt;br /&gt;                StreamGobbler(proc.getErrorStream(), "ERROR");            &lt;br /&gt;            &lt;br /&gt;            // any output?&lt;br /&gt;            StreamGobbler outputGobbler = new &lt;br /&gt;                StreamGobbler(proc.getInputStream(), "OUTPUT", fos);&lt;br /&gt;                &lt;br /&gt;            // kick them off&lt;br /&gt;            errorGobbler.start();&lt;br /&gt;            outputGobbler.start();&lt;br /&gt;                                    &lt;br /&gt;            // any error???&lt;br /&gt;            int exitVal = proc.waitFor();&lt;br /&gt;            System.out.println("ExitValue: " + exitVal);&lt;br /&gt;            fos.flush();&lt;br /&gt;            fos.close();        &lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running GoodWinRedirect produces:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java GoodWinRedirect test.txt&lt;br /&gt;OUTPUT&gt;'Hello World'&lt;br /&gt;ExitValue: 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After running GoodWinRedirect, test.txt does exist. The solution to the pitfall was to simply control the redirection by handling the external process's standard output stream separately from the Runtime.exec() method. We create a separate OutputStream, read in the filename to which we redirect the output, open the file, and write the output that we receive from the spawned process's standard output to the file. Listing 4.7 completes that task by adding a new constructor to our StreamGobbler class. The new constructor takes three arguments: the input stream to gobble, the type String that labels the stream we are gobbling, and the output stream to which we redirect the input. This new version of StreamGobbler does not break any of the code in which it was previously used, as we have not changed the existing public API -- we only extended it.&lt;br /&gt;&lt;br /&gt;Since the argument to Runtime.exec() is dependent on the operating system, the proper commands to use will vary from one OS to another. So, before finalizing arguments to Runtime.exec() and writing the code, quickly test the arguments. Listing 4.8 is a simple command-line utility that allows you to do just that.&lt;br /&gt;&lt;br /&gt;Here's a useful exercise: try to modify TestExec to redirect the standard input or standard output to a file. When executing the javac compiler on Windows 95 or Windows 98, that would solve the problem of error messages scrolling off the top of the limited command-line buffer. &lt;br /&gt;&lt;br /&gt;Listing 4.8 TestExec.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;// class StreamGobbler omitted for brevity&lt;br /&gt;&lt;br /&gt;public class TestExec&lt;br /&gt;{&lt;br /&gt;    public static void main(String args[])&lt;br /&gt;    {&lt;br /&gt;        if (args.length &lt; 1)&lt;br /&gt;        {&lt;br /&gt;            System.out.println("USAGE: java TestExec \"cmd\"");&lt;br /&gt;            System.exit(1);&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            String cmd = args[0];&lt;br /&gt;            Runtime rt = Runtime.getRuntime();&lt;br /&gt;            Process proc = rt.exec(cmd);&lt;br /&gt;            &lt;br /&gt;            // any error message?&lt;br /&gt;            StreamGobbler errorGobbler = new &lt;br /&gt;                StreamGobbler(proc.getErrorStream(), "ERR");            &lt;br /&gt;            &lt;br /&gt;            // any output?&lt;br /&gt;            StreamGobbler outputGobbler = new &lt;br /&gt;                StreamGobbler(proc.getInputStream(), "OUT");&lt;br /&gt;                &lt;br /&gt;            // kick them off&lt;br /&gt;            errorGobbler.start();&lt;br /&gt;            outputGobbler.start();&lt;br /&gt;                                    &lt;br /&gt;            // any error???&lt;br /&gt;            int exitVal = proc.waitFor();&lt;br /&gt;            System.out.println("ExitValue: " + exitVal);&lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running TestExec to launch the Netscape browser and load the Java help documentation produces:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java TestExec "e:\java\docs\index.html"&lt;br /&gt;java.io.IOException: CreateProcess: e:\java\docs\index.html error=193&lt;br /&gt;        at java.lang.Win32Process.create(Native Method)&lt;br /&gt;        at java.lang.Win32Process.&lt;init&gt;(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.execInternal(Native Method)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at java.lang.Runtime.exec(Unknown Source)&lt;br /&gt;        at TestExec.main(TestExec.java:45)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Our first test failed with an error of 193. The Win32 error for value 193 is "not a valid Win32 application." This error tells us that no path to an associated application (e.g., Netscape) exists, and that the process cannot run an HTML file without an associated application. &lt;br /&gt;&lt;br /&gt;Therefore, we try the test again, this time giving it a full path to Netscape. (Alternately, we could add Netscape to our PATH environment variable.) A second run of TestExec produces:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java TestExec &lt;br /&gt;"e:\program files\netscape\program\netscape.exe e:\java\docs\index.html"&lt;br /&gt;ExitValue: 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This worked! The Netscape browser launches, and it then loads the Java help documentation. &lt;br /&gt;&lt;br /&gt;One additional improvement to TestExec would include a command-line switch to accept input from standard input. You would then use the Process.getOutputStream() method to pass the input to the spawned external program. &lt;br /&gt;&lt;br /&gt;To sum up, follow these rules of thumb to avoid the pitfalls in Runtime.exec():&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You cannot obtain an exit status from an external process until it has exited&lt;br /&gt;&lt;br /&gt;You must immediately handle the input, output, and error streams from your spawned external process &lt;br /&gt;&lt;br /&gt;You must use Runtime.exec() to execute programs &lt;br /&gt;&lt;br /&gt;You cannot use Runtime.exec() like a command line &lt;br /&gt;&lt;br /&gt;Correction to Pitfall 3&lt;br /&gt;In the discussion of Pitfall 3 ("Don't mix floats and doubles when generating text or XML messages") in my last column, I incorrectly stated that the different string representation of a decimal number after casting it from a float to a double was a bug. While this is a pitfall, its cause is not a bug, but the fact that the decimal numbers in question -- 100.28 and 91.09 -- do not represent precisely in binary. I'd like to thank Thomas Okken and the others who straightened me out. If you enjoy discussing the finer points of numerical methods, you can email Thomas. &lt;br /&gt;&lt;br /&gt;The combination of forgetting my numerical methods class, the numerous bug reports on the bug parade, and the automatic rounding of floats and doubles when printing (but not after casting a float to a double) threw me. I apologize for confusing anyone who read the article, especially to new Java programmers. I present two better solutions to the problem: &lt;br /&gt;&lt;br /&gt;The first possible solution is to always specify the desired rounding explicitly with NumberFormat. In my case, I use the float and double to represent dollars and cents; therefore, I need only two significant digits. Listing C3.1 demonstrates how to use the NumberFormat class to specify a maximum of two fraction digits.&lt;br /&gt;&lt;br /&gt;Listing C3.1 FormatNumbers.java&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.text.*;&lt;br /&gt;&lt;br /&gt;public class FormatNumbers&lt;br /&gt;{&lt;br /&gt;    public static void main(String [] args)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            NumberFormat fmt = NumberFormat.getInstance();&lt;br /&gt;            fmt.setMaximumFractionDigits(2);&lt;br /&gt;            float f = 100.28f;&lt;br /&gt;            System.out.println("As a float        : " + f);&lt;br /&gt;            double d = f;&lt;br /&gt;            System.out.println("Cast to a double  : " + d);&lt;br /&gt;            System.out.println("Using NumberFormat: " + fmt.format(d));            &lt;br /&gt;        } catch (Throwable t)&lt;br /&gt;          {&lt;br /&gt;            t.printStackTrace();&lt;br /&gt;          }          &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When we run the FormatNumbers program, it produces:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;E:\classes\com\javaworld\jpitfalls\article2&gt;java FormatNumbers&lt;br /&gt;As a float        : 100.28&lt;br /&gt;Cast to a double  : 100.27999877929688&lt;br /&gt;Using NumberFormat: 100.28&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As you can see -- regardless of whether we cast the float to a double -- when we specify the number of digits we want, it properly rounds to that precision -- even if the number is infinitely repeating in binary. To circumvent this pitfall, control the formatting of your doubles and floats when converting to a String.&lt;br /&gt;&lt;br /&gt;A second, simpler solution would be to not use a float to represent cents. Integers (number of pennies) can represent cents, with a legal range of 0 to 99. You can check the range in the mutator method.&lt;br /&gt;&lt;br /&gt;Next time&lt;br /&gt;In my next column, I'll present another pitfall from java.lang, as well as two traps hiding in the java.net and the Swing packages. If you know of any Java pitfalls that have wasted your time and caused you frustration, please email them to me so we can save others the same fate. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;About the author&lt;br /&gt;Michael C. Daconta is the director of Web and technology services for McDonald Bradley, where he conducts training seminars and develops advanced systems with Java, JavaScript, and XML. Over the past 15 years, Daconta has held every major development position, including chief scientist, technical director, chief developer, team leader, systems analyst, and programmer. He is a Sun-certified Java programmer and coauthor of Java Pitfalls (John Wiley &amp; Sons, 2000), Java 2 and JavaScript for C and C++ Programmers (John Wiley &amp; Sons, 1999), and XML Development with Java 2 (Sams Publishing, 2000). In addition, he is the author of C++ Pointers and Dynamic Memory&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113549487674443972?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113549487674443972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113549487674443972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113549487674443972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113549487674443972'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/12/java-runtimeexec-problem.html' title='java Runtime.exec problem'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113547866538204157</id><published>2005-12-24T18:43:00.000-08:00</published><updated>2005-12-24T18:44:38.206-08:00</updated><title type='text'>open source cdp netdisco</title><content type='html'>NetDisco tool&lt;br /&gt;http://netdisco.org/269,21,Details ► Architecture&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113547866538204157?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113547866538204157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113547866538204157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113547866538204157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113547866538204157'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/12/open-source-cdp-netdisco.html' title='open source cdp netdisco'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113547777618931122</id><published>2005-12-24T18:28:00.000-08:00</published><updated>2005-12-24T18:36:54.400-08:00</updated><title type='text'>network simulation tool</title><content type='html'>http://ontwerpen1.khlim.be/projects/netsim/&lt;br /&gt;&lt;br /&gt;Zebra&lt;br /&gt;ADIOS ( Automated Download and Installation of Operating Systems)&lt;br /&gt;SSF Network Simulation&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113547777618931122?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113547777618931122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113547777618931122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113547777618931122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113547777618931122'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/12/network-simulation-tool.html' title='network simulation tool'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113547523364056510</id><published>2005-12-24T17:46:00.000-08:00</published><updated>2005-12-24T17:47:13.886-08:00</updated><title type='text'>reverse proxy</title><content type='html'>http://www.sans.org/rr/whitepapers/webservers/302.php&lt;br /&gt;&lt;br /&gt;A Reverse Proxy Is A Proxy By Any Other Name&lt;br /&gt;By Art Stricek&lt;br /&gt;Version 1.2f&lt;br /&gt;January 10, 2002&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113547523364056510?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113547523364056510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113547523364056510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113547523364056510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113547523364056510'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/12/reverse-proxy.html' title='reverse proxy'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113459425514541416</id><published>2005-12-14T13:03:00.000-08:00</published><updated>2005-12-14T13:04:15.530-08:00</updated><title type='text'>primary key</title><content type='html'>http://r937.com/20020620.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Online Extra&lt;br /&gt;Mike Lonigro &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Case for the Surrogate Key&lt;br /&gt;A simple key to the flexible enterprise database&lt;br /&gt;There is a simple, inexpensive, uniform element of database design that you are likely avoiding in favor of a complex, costly, and inconsistent one. This element is the surrogate or substitute primary key. It seems that designers avoid these independent keys like the plague. Instead, all but the most basic business entities are given keys made up of some series of attributes, borrowed keys, and sequence numbers . It was only after experiencing many problems at the hand of intelligent keys that I, too, became a believer in the flexibility and stability afforded by the substitute key. &lt;br /&gt;      In this article I'll illustrate why the surrogate primary key is a critically important ingredient in designing stable, flexible, and well-performing enterprise databases. I will define the issues, analyze them to arrive at a set of principles of primary key design, identify the criteria for defining a surrogate key on a table, suggest a standard for implementation, and finally, note some benefits our shop (J. B. Hunt Transport Inc.) enjoys from consistent application of a surrogate primary key. &lt;br /&gt;THE ISSUES&lt;br /&gt;The first issue is the function of the primary key. What exactly is the real purpose of the primary key? Because form follows function, defining the role of the primary key will settle much debate about its format, and it will help us determine some principles with which we can resolve the remaining issues. &lt;br /&gt;      Another issue is the distinction between the logical and physical keys. Can these keys be the same? For example, a customer identifier and date may be used to check for a duplicate order before entering it into a database. A sequence number may be added to distinguish line items one from another. But once the order and line items are entered into the database, should these data elements form the primary keys for these tables? &lt;br /&gt;      The meaningfulness of the primary key is another issue I'll discuss. How much information should the primary key hold? For example, a legacy system in our shop gave to each transport accident a primary key formed by combining the year with an accident sequence number and a type code. Another application assigned order numbers within ranges based on order type. Are these good choices for the primary key? &lt;br /&gt;      The final issue I will address is the source of the primary key. Can it be provided from outside the system or by a system user? Examples are Social Security numbers to identify people; user-generated pnemonic codes to identify customers and accounts; and catalog, part, or transaction numbers generated by external agencies. Why not use these identifiers as primary keys? &lt;br /&gt;ANALYSIS&lt;br /&gt;Proper primary key design recognizes that there are two unique keys to be considered. Database designers make a critical mistake when they fail to recognize the distinction between these keys. The logical unique key distinguishes entity occurrences from others to avoid duplicates before entry into the database. That is why this key is typically composed of attributes and relationships that the business can recognize as distinguishing occurrences logically from others. The primary key, however, is a physical design element that uniquely identifies rows after they are in the database. It is used in creating foreign keys in other tables in order to establish the logical relationships in the data model. In fact, it is best to consider a primary key's primary purpose to be establishing relationships in the database! &lt;br /&gt;      The primary key's role as a physical row identifier has important implications. First, it requires that the primary key be physically unique in the primary key table. Tables are sometimes created with primary keys that logically identify occurrences but may appear more than once in the primary key table. This repetition usually betrays a failure to define properly either the criteria for new occurrences of the entity or the real physical purpose of the table. &lt;br /&gt;      For example, a table may store work order types and identify them with a number or code. But the identifier may appear on more than one "inactive" row in the primary key table with perhaps one occurrence in an "active" status. In this case, the meaning of the work order type becomes unclear. Are all rows with the same key related to the original occurrence? Or are they truly different work order types that have passed their identifiers to newer occurrences? Alternatively, several rows sharing a primary key value may be distinguished by effective and end date ranges. In this case, the table is really acting as an audit of changes to the logical occurrence. But what table really represents the business entity itself? &lt;br /&gt;      Second, the primary key must never be null. This must be true even if any of the elements of the logical unique key are unknown. Like nonunique primary keys, null primary keys usually signal a failure to define clearly what the row represents. If we create an ORDER but fail to give it an order number until it is shipped, does the row represent the ORDER or the SHIPMENT? If we create an EMPLOYEE APPLICANT but do not assign a key until the application is received, are we equating the APPLICANT with the APPLICATION? What happens if we get a second APPLICATION from the same APPLICANT? &lt;br /&gt;      Third, the primary key must be absolutely stable. It must be protected in all cases from change. This does not mean protected from likely change; rather, it must be guaranteed not to be allowed to change. This third principle is always violated when an "intelligent" key is used as the primary key. &lt;br /&gt;      In the first example, the relationships and attributes that logically identify the order and line item are also used as the primary key (see Figure 1). One problem with these is that they can change. The order's customer may be incorrectly entered, for example. If we discover the error midway through processing the order, how do we correct it? There are two unpleasant options: We can either create a brand new order and cancel the original, or we can change the primary key value of the order. Suppose we choose the first option and create another order. Is this a true picture of business reality? That is, do we really have another order? Do we really want to reprocess the order under a new identifier? &lt;br /&gt;1A If any attribute making up the primary key of the ORDER or ORDER LINE ITEM changes, all foreign key references to these tables (TABLE A, TABLE B, and TABLE C) must also be updated and committed together. &lt;br /&gt;&lt;br /&gt;1B Here the ORDER and ORDER LINE ITEM tables have surrogate primary keys different than the unique keys. All foreign key references to them (TABLE A, TABLE B, and TABLE C) are insulated from changes to unique key attributes. &lt;br /&gt;   &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Figure 1. Eliminating the Effect of Change in Key Value.    &lt;br /&gt;  &lt;br /&gt;      The second option is to change the value of the order's primary key. In this case, we must also change every foreign key reference to the order within the same commit unit! Each new reference must also be included in this update. Would it not be more correct and efficient simply to change the order's customer and continue processing the order? A surrogate key independent of all the order's attributes or relationships allows us to correct the order and maintain the information already contained in the database easily. &lt;br /&gt;      Another problem illustrated here is that of concatenated primary keys. Because the order's primary key in our example has been migrated into the primary key of the line item, all references to the order line item must also change with a change in the order's key. The problem grows as we chain together more keys in the database. Migration of primary keys in this fashion has terrible implications for database flexibility. &lt;br /&gt;      These examples illustrate how primary keys must be insulated from changes in value and so should not comprise attributes, relationships, or primary keys migrated from other tables. But even if its value is truly stable, the primary key must never be the same as the logical unique key because the set of attributes and relationships that make an entity unique may itself change. &lt;br /&gt;      Associative entities provide a good example of this (see Figure 2). An associative entity contains attributes about a many-to-many relationship between two or more occurrences. Because the entity is defined by its relationships, we are tempted to use the foreign key columns in the primary key. For example, our company has a PART OFFERING associative entity, which stores pricing and configuration information for a PART as it is sold or offered by a VENDOR. A PART OFFERING is unique on the PART id, VENDOR id, and offering date. Why not use these columns as the primary key? &lt;br /&gt;2A Here the PART OFFERING associative entity uses the logical unique key as the primary key. A change requiring PART OFFERINGs to be unique additionally on TIME requires changes to all related foreign key structures (TABLE A and TABLE B). &lt;br /&gt;&lt;br /&gt;2B The PART OFFERING has a surrogate key different from the logical unique key. The new requirement to make PART OFFERING unique on an additional TIME attribute does not impact any foreign key structures (TABLE A and TABLE B). &lt;br /&gt;   &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Figure 2. Eliminating the Effect of Change in Key Structure.    &lt;br /&gt;  &lt;br /&gt;      The reason is that over time, the business may wish to capture PART OFFERINGs at a finer level of detail. We may begin to track multiple PART OFFERINGs for fuel offered by the same vendor at more than one price in a day. If we had used the unique key as the primary key, we would need to modify all programs and tables that reference unique PART OFFERINGs to include the offering time. A more stable design would give the PART OFFERING a surrogate key. The new business requirement would require only changes to the unique key index on the PART OFFERING table and any programs that insert or update its rows. The programs and other tables referencing the PART OFFERING by the surrogate key would be unaffected. &lt;br /&gt;      The third issue I raised involves primary keys that contain attributes unrelated to the logical unique key. This type of key appears in many forms and is subject to the same problems I addressed above. Additionally, these keys are especially inflexible to expansion of the definition or usage of data. New subtypes of orders or accidents, for example, are typically handled by assigning different ranges or formats of primary key values. As these applications increase, smaller key ranges cause rollover and archiving issues while applications are forced to come up with imaginative new identification schemes just to insert a row in the database. &lt;br /&gt;      Another example of this kind of key occurs when a key value implicitly represents a hierarchy among rows in a table. This type of key is inflexible to additional levels and limits the number of occurrences at any given level. For example, standard commodity codes used across the transportation industry are assigned key values whose format indicates an arbitrary level in a hierarchy of commodity classifications. A broad commodity classification is given a key of 100000; the classification level immediately beneath it has keys of the form 101000, 102000, and so on; and the next level keys of the form 101010, 101020. A better design would give each occurrence a surrogate primary key; child occurrences would have a foreign key back to the parent. In this way, classifications can have a varying and unlimited number of levels and occurrences. &lt;br /&gt;      Finally, primary key values must be internally assigned. The first reason is, again, due to stability. Social Security numbers may be miskeyed, unknown, or changed; business users may invent new coding schemes to identify customers; and outside agencies may reformat or reuse identifiers at their own will. &lt;br /&gt;      Another reason the values must be assigned internally is that we may define entities differently than the outside agencies that provide our data. For example, a vendor that sells us uniforms uses a different ITEM number to identify each different size of uniform. In our database, however, we create one ITEM with many sizes. This standard definition allows us to draw consistent information out of the database independent of vendor numbering schemes. Using the vendor's assigned ITEM number would cause us to create ITEMs based on each vendor's definition and not ours. &lt;br /&gt;      The best way to avoid the pitfalls indicated by these illustrations is to choose a primary key that is logically meaningless; this is the surrogate primary key. Doing this means, above all, that the primary key must be owned by the data administrator. Intelligent, problematic primary keys will be assigned when application developers or users begin to take ownership of the primary key. When this happens, the real purpose of the primary key is lost; it becomes a "good idea" number that tells a story about the row it identifies. The primary key is not a "good idea" number; its purpose is to physically identify a row to the database. &lt;br /&gt;      To summarize, the primary key must be: &lt;br /&gt;Unique &lt;br /&gt;Not null &lt;br /&gt;Stable &lt;br /&gt;Different than the logical unique key &lt;br /&gt;Internally assigned &lt;br /&gt;Logically meaningless. &lt;br /&gt;THE CRITERIA&lt;br /&gt;Does every table require a surrogate primary key? The answer is no. The prerequisites derive from the definition of the primary key. Because the primary key identifies a row after it is in the database, it follows that a table requires a primary key if its rows will be referenced individually by other tables after entry into the database. &lt;br /&gt;      There are two alternative views of this. The logical view asks: does the table participate in more than one relationship from the logical data model? For example, in a human resources database, an EMPLOYEE table will likely participate in more than one relationship; we may relate the EMPLOYEE to BENEFITs, POSITIONs, LOCATIONs, EVALUATIONs, and many other entities in our data model. For this reason, the EMPLOYEE gets a surrogate key (see Figure 3). But now suppose we need a table to store the EMPLOYEE DEPENDENTs. We must determine whether or not the DEPENDENT participates in more than one relationship from the data model. If we care to relate the DEPENDENT only to the EMPLOYEE, then the DEPENDENT table represents a repeating attribute of the EMPLOYEE entity. It does not require a surrogate key, but it may have a unique key consisting of the EMPLOYEE key and some combination of attributes of the DEPENDENT. If, however, we also wish to relate DEPENDENTs to BENEFITs, then the DEPENDENT participates in a second relationship, becomes an entity in the logical data model, and gets a surrogate key. &lt;br /&gt;3A The DEPENDENT is related only to the EMPLOYEE, and has a unique key but no surrogate key. &lt;br /&gt;&lt;br /&gt;3B The DEPENDENT has its own relationships (TABLE A and TABLE B) and gets a surrogate key. &lt;br /&gt;   &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Figure 3. The Data Model in Primary Key Assignment.    &lt;br /&gt;  &lt;br /&gt;      The physical view asks: Do we need to reference the rows individually for physical processing reasons? For example, we may wish to trigger certain DEPENDENTs to be processed through some application. Rather than reading all rows in the table looking for a few process flags, we may give the DEPENDENT a surrogate key and store the values of the "flagged" DEPENDENTs in a trigger table. After the DEPENDENT is processed, the row representing the DEPENDENT in the trigger table is deleted. This may be simpler than storing the series of columns that reference a single DEPENDENT. &lt;br /&gt;A SUGGESTED STANDARD&lt;br /&gt;Our shop has enjoyed success with the implementation of a simple primary key standard containing two critical elements. First, all our primary keys are sequentially assigned positive integers. In DB2, we use a large INTEGER column. This allows us to store more than 2.1 billion occurrences of any entity in our model. We can create an occurrence every second of every day for 68 years and still not run out of values. Certainly few business entities are created this frequently. &lt;br /&gt;      Second, all primary keys are assigned through an enterprise module that receives a logical table name, obtains an exclusive lock on a row containing that table's next primary key value, increments the value, and passes it back to the caller. The primary key is assigned by logical table because we sometimes split a logical table into two or more physical tables for performance. The rows that form the one logical row share their primary key value. &lt;br /&gt;THE BENEFITS&lt;br /&gt;The consistent format of primary keys throughout our database provides benefits in addition to flexibility. One is in the implementation of optional relationships (see Figure 4). For example, we create INVOICE ITEMs but may not relate them to an INVOICE until perhaps several days later. The INVOICE foreign key in the INVOICE ITEM table thus needs to be logically null. Physically, however, a zero or dummy INVOICE value would heavily skew the foreign key index. Instead, the null foreign key receives a value equal to the row's own primary key multiplied by negative one. This distributes the foreign key index values evenly across all rows, whether or not the foreign key relationship exists. &lt;br /&gt;4 The INVOICE ITEM has an optional relationship to the INVOICE. ITEMs without a related INVOICE receive a foreign key value equal to their primary key multiplied by -1. The index over the INVOICE foreign key is evenly distributed. &lt;br /&gt;   &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Figure 4. Handling Absent Foreign Keys.    &lt;br /&gt;  &lt;br /&gt;      A second benefit is that "Exclusive OR" relationships can be handled with one well-indexed column (see Figure 5). An "Exclusive OR" relationship exists when an entity occurrence may relate to at most one of a number of possible occurrences. A given INVOICE ITEM, for example, may pertain to one of any number of different possible entities in our model; we may invoice SHIPMENTs, STOPs, ACTIVITIES, or others. Different primary key domains would require a foreign key for each possible relationship, all but one of which would contain a value. Instead, we use a single indexed foreign key column. A second column names the table referenced by the foreign key. &lt;br /&gt;5 The INVOICE ITEM can bill a SHIPMENT, STOP, or ACTIVITY, exclusively. A single foreign key handles all relationships. A second column names the table containing the primary key value. &lt;br /&gt;   &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Figure 5. Handlign Exclusive or Foreign Keys.    &lt;br /&gt;  &lt;br /&gt;      Poor primary key design is perhaps the most repeated and damaging flaw in database design. We would do well to remember that a smart key is a dumb thing to do, while a dumb key is a smart thing to do. &lt;br /&gt;Mike Lonigro is the senior data administrator responsible for all conceptual, logical, and physical database design at J. B. Hunt Transport Inc., the nation's largest publicly held truckload carrier. J.B. Hunt Transport runs on DB2 for OS/390 at more than 3 million transactions per day. Previously, Lonigro was a consultant with Price Waterhouse MCS in the Petroleum Special Practice Unit. You can reach him via email at lonigro@mail.jbhunt.com. &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;search - home - archives - contacts - site index &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copyright 1997 Miller Freeman Inc. All Rights Reserved&lt;br /&gt;Redistribution without permission is prohibited.&lt;br /&gt;&lt;br /&gt;Questions? Comments? We wo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113459425514541416?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113459425514541416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113459425514541416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113459425514541416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113459425514541416'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/12/primary-key.html' title='primary key'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113402128575319015</id><published>2005-12-07T21:54:00.000-08:00</published><updated>2005-12-07T21:54:46.306-08:00</updated><title type='text'>java certificate</title><content type='html'>http://www.jabacats.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113402128575319015?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113402128575319015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113402128575319015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113402128575319015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113402128575319015'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/12/java-certificate.html' title='java certificate'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113264316977453545</id><published>2005-11-21T23:05:00.000-08:00</published><updated>2005-11-21T23:06:09.783-08:00</updated><title type='text'>thread dump stack trace</title><content type='html'>http://www.me.umn.edu/~shivane/blogs/cafefeed/archive/2004_06_01_archive.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113264316977453545?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113264316977453545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113264316977453545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113264316977453545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113264316977453545'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/11/thread-dump-stack-trace.html' title='thread dump stack trace'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8066513.post-113091342552144760</id><published>2005-11-01T22:35:00.000-08:00</published><updated>2005-11-01T22:37:05.520-08:00</updated><title type='text'>linux tuning virtual memory</title><content type='html'>http://www.weberdev.com/Manuals/rhl-rg-en-73/s1-proc-directories.html&lt;br /&gt;&lt;br /&gt;http://people.redhat.com/nmurray/RHEL-2.1-VM-whitepaper.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8066513-113091342552144760?l=iamjerryyeung.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iamjerryyeung.blogspot.com/feeds/113091342552144760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8066513&amp;postID=113091342552144760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113091342552144760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8066513/posts/default/113091342552144760'/><link rel='alternate' type='text/html' href='http://iamjerryyeung.blogspot.com/2005/11/linux-tuning-virtual-memory.html' title='linux tuning virtual memory'/><author><name>iamjerryyeung</name><uri>http://www.blogger.com/profile/03519739527132309026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
