<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Nilesh D Kapadia</title>
 <link href="http://nileshk.com/atom.xml" rel="self"/>
 <link href="http://nileshk.com/"/>
 <updated>2017-04-14T23:06:04-04:00</updated>
 <id>http://nileshk.com/</id>
 <author>
   <name>Nilesh Kapadia</name>
   <email>feed@nileshk.com</email>
 </author>

 
 <entry>
   <title>Using a Samsung ARM Series 3 Chromebook on a trip to New York</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2013/05/27/using-samsung-arm-chromebook-on-vacation.html"/>
   <updated>2013-05-27T00:00:00-04:00</updated>
   <id>http://nileshk.com/2013/05/27/using-samsung-arm-chromebook-on-vacation</id>
   <content type="html">&lt;p&gt;The 11.6” Samsung ARM Chromebook (the $250 one) is a great travel laptop.  It runs an OS based around a fully functional version of Chrome that works just like the desktop version, and it has Flash.  It’s light (2.42 lbs) and gets 7 hours of battery life.&lt;/p&gt;

&lt;h2 id=&quot;operating-system&quot;&gt;Operating System&lt;/h2&gt;

&lt;p&gt;Chrome OS in general has impressed me.  I’m surprised by the attention to detail and polish.  And despite being a simple OS based around a web browser, they managed to provide many of the things desktop OS users tend to expect.  For example, there is a screenshot feature that works similar to that of OS X.  There is a file browser that is quite usable.  It has convenient window management functions, such as being able to resize windows to various sizes.  I look forward to seeing Chrome OS evolve.  It’s not perfect, and there is room for improvement, but it’s in a good place right now.&lt;/p&gt;

&lt;p&gt;At the time of this writing, I have not even enabled developer mode yet, which would allow me to use Crouton to install Ubuntu Linux packages.  But I may do that soon, as I’d like to have a local instance of Emacs I could run, and a full UNIX environment would be nice.&lt;/p&gt;

&lt;h2 id=&quot;value&quot;&gt;Value&lt;/h2&gt;

&lt;p&gt;It comes with 2 years of 100GB Google Drive, which is worth $120.  It also comes with 12 GoGo internet passes which allow you to use wifi while on airplanes that support that.  I used those passes on both flights, to and from New York.  They expire in a few years (12/31/2015), so I saw no reason to save them, as I don’t travel that often.  I believe this normally costs $5 for a 30 minutes, but these free passes last the whole flight.  If you used internet for 2 hours per flight, that is a $240 value. If you use these things, the Chromebook pays for itself.&lt;/p&gt;

&lt;h2 id=&quot;managing-photos&quot;&gt;Managing Photos&lt;/h2&gt;

&lt;p&gt;I was able to take the SD card from my camera and copy the photos we took to the ChromeBook onto it’s 16GB drive, and then upload them Google Drive to be on the safe side (if all our stuff got stolen, damaged, or lost, we’d still have the photos).  I could have also just copied directly from the SD card to Google Drive, but uploading several gigabytes of photos takes a long time, I wanted to put the SD card back in the camera.&lt;/p&gt;

&lt;p&gt;The file manager can be used for actually browsing photos you have stored locally.  It is a bit too slow, but you can use it if you’re patient (I’m used to Aperture, which is quite speedy once it gets a chance to generate thumbnails).  You can also browse the photos you have in Google Docs, but you are at the mercy of the speed of your internet connection, and I did not find that effective.  This is ok, because I generally save the task of sorting through my photos for after vacations.&lt;/p&gt;

&lt;h2 id=&quot;battery-life&quot;&gt;Battery Life&lt;/h2&gt;

&lt;p&gt;Battery life is great.  It claims to do 7hrs, and so far, I believe it can (though I haven’t taken it all the way to 0% yet).  One nice thing is that you can just turn it off completely to conserve power, and when you turn it back on, it’s right where you left off (as if you did hibernate).  Startup is very fast, about 10 seconds or so.&lt;/p&gt;

&lt;h2 id=&quot;low-power-consumption&quot;&gt;Low Power Consumption&lt;/h2&gt;

&lt;p&gt;Thanks to the power-efficient ARM CPUs, this laptop consumes very little power.  It is actually passively cooled, meaning that it has no fans at all, so it is virtually silent and you don’t have to worry about whether or not you are blocking fan holes.&lt;/p&gt;

&lt;h2 id=&quot;keyboard-and-trackpad&quot;&gt;Keyboard and Trackpad&lt;/h2&gt;

&lt;p&gt;The keyboard and trackpad are nice and I have no complaints, and I say that as someone who primarily uses Macs.  The only thing I’d like to see is an option for next/previous swipe gestures on the trackpad; it’s possible they could add this in a Chrome OS update.&lt;/p&gt;

&lt;h2 id=&quot;downsides&quot;&gt;Downsides&lt;/h2&gt;

&lt;p&gt;The downsides are that the build quality is cheap and the display is low quality with poor viewing angles; you are definitely getting what you paid for there.  I am spoiled by the Retina Display and MacBook displays in general, but I got used to the display and don’t mind it after several days of using it.  And despite the cheap build quality, at least they did a nice enough job in the design of the laptop, something you may not see in the sub-$300 category.&lt;/p&gt;

&lt;h2 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h2&gt;

&lt;p&gt;For me, this is much more useful travel device than, say, a tablet like an iPad or the Nexus 7 I own.  I bought mine used and spent only $175, which is less than what an action-packed vacation day in New York costs, so I don’t stress about it getting stolen or damaged in the same way I would a MacBook.  So far I’m very happy with this device.  Next time I’ll see how it does at home.&lt;/p&gt;

&lt;h2 id=&quot;note-bad-experience-with-a-defective-unit-best-buy-open-box&quot;&gt;Note: Bad experience with a defective unit (Best Buy open box)&lt;/h2&gt;

&lt;p&gt;I did have a bad experience with one initially, but it had a physically defective trackpad that would cause the mouse button to be clicked or held down just from the laptop’s body flexing.  This made it unusable.  That one was a Best Buy open box.  I would think most of the returns that result in used or open box items are people who didn’t know what they were getting (Chrome OS has it’s limitations), but it’s possible there are also a good amount of defective units being returned and sold as open box or used instead of returned to the manufacturer.  I bought the used one from Amazon warehouse, and have no problems with it, though it does have a few scuffs here and there.  If you want to buy new, it’s still a great deal at $250.&lt;/p&gt;

&lt;h2 id=&quot;upcoming&quot;&gt;Upcoming&lt;/h2&gt;
&lt;p&gt;After writing this, a week later I enabled developer mode, installed Ubuntu (in a chroot) using Crouton, and installed Emacs and a few other essential utilities.  I am only starting to get into using this, and hope to share more of my experiences with that.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Android SSH App with Full Bluetooth Keyboard Support</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2012/12/19/Android-SSH-with-full-bluetooth-keyboard-support.html"/>
   <updated>2012-12-19T00:00:00-05:00</updated>
   <id>http://nileshk.com/2012/12/19/Android-SSH-with-full-bluetooth-keyboard-support</id>
   <content type="html">&lt;p&gt;As a UNIX and Emacs user, the idea of having a mobile device with a Bluetooth keyboard attached with an SSH client is very appealing.  I can get a lot done with just a shell and Emacs.  However, Bluetooth keyboard support in most SSH clients for iOS and Android typically is lacking full support.  Ctrl and Alt/Meta key combinations often don’t all work.  There was enough missing such that I couldn’t comfortably use Emacs with my usual keybindings.  For iOS I did not find a solution, and I think the problem is that Apple does not give developers enough access to the keyboard to make this possible.  With Android, all the actual SSH apps I tried were also lacking this, but I did eventually find an app that worked (without rooting), and that app’s primary purpose wasn’t even a SSH client, it just happened to include one.&lt;/p&gt;

&lt;p&gt;The app I found is &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside&quot;&gt;Terminal IDE&lt;/a&gt;.  Terminal IDE is “an expandable terminal application, with a full Java / HTML / Android development kit” and it happens to include a SSH client.  Bluetooth keyboard support appears to work perfectly, and I can use all the Emacs-style key combinations I normally use (all the Ctrl or Alt key combinations that I use).&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Apple Maps</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2012/09/24/apple-maps.html"/>
   <updated>2012-09-24T00:00:00-04:00</updated>
   <id>http://nileshk.com/2012/09/24/apple-maps</id>
   <content type="html">&lt;p&gt;We don’t really know what business decision lead to Apple creating their own solution and abandoning Google Maps.  I guess no one outside of Apple and Google knows for sure, but it seemed that Google refused to license turn-by-turn navigation data to Apple, which was a major issue for the iOS version.  Google’s prices on licensing Google Maps have been steadily increasing (Apple’s not the only one who has switched to alternatives because of this).  While it may have been that they don’t want to be dependent on a direct competitor, it could also have been a purely financial decision that they were forced to make, and also they would have never had turn-by-turn navigation if they continued to rely on Google Maps (though they could’ve possibly had a separate navigation app while still using Google Maps for the regular maps app, or integrated with 3rd party navigation apps).&lt;/p&gt;

&lt;p&gt;It is a problem, though, and Google gains an even bigger advantage here (their maps for Android was already superior before this).  There’s rumor that Google is going to release Maps for iOS, but who knows when or if that’s going to happen.&lt;/p&gt;

&lt;p&gt;To be clear, while the user interface seems to be quite good, the problem here is the data.  Google has probably put more effort into their map data than anyone else.  Just look at what they’ve done with their street cars.  They’ve also had a large user base hammering away at their maps and making corrections.  While Apple is relying on a &lt;a href=&quot;http://gspsa21.ls.apple.com/html/attribution.html&quot;&gt;combination of sources&lt;/a&gt; of existing map data (including TomTom, OpenStreetMap, etc), they have some serious catching up to do.  I think Apple is playing a long game here, but maps are going to suffer for it in the near term.  Assuming Apple is going to actively work on improving map data themselves, what I’d like to see is Apple contributing back to &lt;a href=&quot;http://www.openstreetmap.org/&quot;&gt;OpenStreetMap&lt;/a&gt; (a free, community driven solution, with an open license – it’s the Wikipedia of maps).  If they do this, they could commoditize maps, and this would make Google the priority vendor while Apple is the open solution.  Since anyone can use OpenStreetMap, it would make it Google vs everyone else.  Apple doesn’t need to keep map data as a competitive advantage; their competitive advantage is the complete package that they offer.&lt;/p&gt;

&lt;p&gt;In the near term, what Apple should do is allow setting a default maps application and allow any 3rd party maps app to integrate directly into iOS, so that iOS users aren’t stuck with an inferior solution as the main app in the case that a superior 3rd party solution emerges (like if Google releases their own iOS Maps app).  But this is not the kind of thing they have done in the past.  There is some level of integration for 3rd party transit apps and such, and that helps, but that’s not quite the same thing (you can even make it integrate with Google’s mobile web version of maps with &lt;a href=&quot;https://github.com/simonmaddox/GoogleTransit-iOS6&quot;&gt;this app&lt;/a&gt;, though that’s not in the app store yet as far as I know).&lt;/p&gt;

&lt;p&gt;I don’t think this is going to hurt Apple very much; people are still going to buy their products in droves because they still have a huge advantage over competitors in many other areas (usability, ecosystem, overall user experience, etc).  AAPL stock is going to be down today because of the riots at the factory of component suppliers (since this may hurt their supplies and actually decrease their ability to meet demand for the iPhone 5); I don’t think it has to do with maps.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Jekyll and WEBrick with HTML5 audio</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2010/08/29/jekyll-webrick-with-html5-audio.html"/>
   <updated>2010-08-29T00:00:00-04:00</updated>
   <id>http://nileshk.com/2010/08/29/jekyll-webrick-with-html5-audio</id>
   <content type="html">&lt;p&gt;I am working on a site that uses &lt;a href=&quot;http://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt; and also HTML5 audio.  When running the server locally (which uses &lt;a href=&quot;http://en.wikipedia.org/wiki/WEBrick&quot;&gt;WEBrick&lt;/a&gt;), I had issues with playing OGG files using HTML5 audio (MP3 files would play at least in Safari, OGG files would not play in Firefox).  Though the GET request to the server was being received, the browser simply wouldn’t play the music files.&lt;/p&gt;

&lt;p&gt;It turns out that &lt;a href=&quot;http://www.happyworm.com/jquery/jplayer/latest/developer-guide.htm#jPlayer-server-mp3-ogg-response&quot;&gt;certain MIME types are required&lt;/a&gt;, at least for OGG files.  OGG files should be &lt;code class=&quot;highlighter-rouge&quot;&gt;audio/ogg&lt;/code&gt; and MP3 files should be &lt;code class=&quot;highlighter-rouge&quot;&gt;audio/mpeg&lt;/code&gt;.  WEBrick’s &lt;a href=&quot;http://ruby-doc.org/stdlib/libdoc/webrick/rdoc/classes/WEBrick/HTTPUtils.html&quot;&gt;default configuration&lt;/a&gt; did not include these mime types, and Jekyll did not add them.&lt;/p&gt;

&lt;p&gt;To configure this for Jekyll, I edited the jekyll’s &lt;a href=&quot;http://github.com/mojombo/jekyll/blob/master/bin/jekyll&quot;&gt;startup script&lt;/a&gt; like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;  &lt;span class=&quot;n&quot;&gt;mime_types&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;WEBrick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;HTTPUtils&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;DefaultMimeTypes&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;mime_types&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'application/javascript'&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# START mime type edit&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;mime_types&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'mp3'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'audio/mpeg'&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;mime_types&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ogg'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'audio/ogg'&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#  mime_types = WEBrick::HTTPUtils::load_mime_types('/etc/apache2/mime.types')&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# END mime type edit&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;HTTPServer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This adds the mime types for MP3 and OGG files to the default mime types.  Alternatively, you could use the commented-out line that uses &lt;code class=&quot;highlighter-rouge&quot;&gt;load_mime_types&lt;/code&gt; to load Apache’s &lt;code class=&quot;highlighter-rouge&quot;&gt;mime.types&lt;/code&gt; file.  Note that this will completely ignore WEBrick’s defaults and use whatever is in Apache’s &lt;code class=&quot;highlighter-rouge&quot;&gt;mime.types&lt;/code&gt; file (or whatever file you point it to).  The version of that file in my Apache2 installation did have the necessary mime types.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Embedding Apache Tomcat 7.0</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2010/08/25/emdedding-apache-tomcat-7-0.html"/>
   <updated>2010-08-25T00:00:00-04:00</updated>
   <id>http://nileshk.com/2010/08/25/emdedding-apache-tomcat-7-0</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://tomcat.apache.org/&quot;&gt;Apache Tomcat&lt;/a&gt; 7.0 now has a &lt;a href=&quot;http://tomcat.apache.org/download-70.cgi&quot;&gt;beta release&lt;/a&gt; out.  One of it’s features is improved support for embedding.  I have been &lt;a href=&quot;/2009/05/02/embedded-jetty-with-a-spring-web-app.html&quot;&gt;embedding Jetty&lt;/a&gt; successfully in various projects, so I was hoping that Tomcat’s support for embedding was on par with Jetty’s.  So far, Tomcat 7.0’s embedding API is quite easy to use and has been working well.  However, I did not find any documentation on how to actually use it, so it took a small bit of digging to figure out how.&lt;/p&gt;

&lt;h2 id=&quot;details&quot;&gt;Details&lt;/h2&gt;

&lt;p&gt;The one suggestion I read was to look at the test cases, because they used embedded Tomcat.  So I checked out the source code, and found &lt;a href=&quot;http://svn.apache.org/repos/asf/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java&quot;&gt;TomcatBaseTest&lt;/a&gt; which was an abstract class that tests were subclassing which provided a running embedded Tomcat.  The &lt;code class=&quot;highlighter-rouge&quot;&gt;org.apache.catalina.startup.Tomcat&lt;/code&gt; class is what you need to use.  After setting various settings, adding the application(s), you then call the &lt;code class=&quot;highlighter-rouge&quot;&gt;start()&lt;/code&gt; to start Tomcat.  Note that &lt;code class=&quot;highlighter-rouge&quot;&gt;start()&lt;/code&gt; does not block, so if you exit your &lt;code class=&quot;highlighter-rouge&quot;&gt;main&lt;/code&gt; method, Tomcat will quit.&lt;/p&gt;

&lt;p&gt;Like it’s non-embedded version, embedded Tomcat needs to create a &lt;code class=&quot;highlighter-rouge&quot;&gt;work&lt;/code&gt; directory for temporary files.  You specify a base directory which the &lt;code class=&quot;highlighter-rouge&quot;&gt;work&lt;/code&gt; directory will be created in.  I believe this base directory is the equivalent to Tomcat home directory.  Use the &lt;code class=&quot;highlighter-rouge&quot;&gt;setBaseDir(String baseDir)&lt;/code&gt; method to set this.  Looking at the source for &lt;code class=&quot;highlighter-rouge&quot;&gt;Tomcat.initBaseDir()&lt;/code&gt; method, it looks like if you don’t set it using this method, it will try to obtain this by trying:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;From the &lt;code class=&quot;highlighter-rouge&quot;&gt;catalina.base&lt;/code&gt; system property&lt;/li&gt;
  &lt;li&gt;Failing that, from the &lt;code class=&quot;highlighter-rouge&quot;&gt;catalina.base&lt;/code&gt; system property&lt;/li&gt;
  &lt;li&gt;Create a temp directory using &lt;code class=&quot;highlighter-rouge&quot;&gt;user.dir&lt;/code&gt; system property as a base and tomcat.&lt;em&gt;PORT_NUMBER&lt;/em&gt; as the temp directory it creates (replacing &lt;em&gt;PORT_NUMBER&lt;/em&gt; with the actual port number.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can set a port number with &lt;code class=&quot;highlighter-rouge&quot;&gt;setPort(int port)&lt;/code&gt;.  This defaults to 8080 if not set.&lt;/p&gt;

&lt;p&gt;To add an application, use the &lt;code class=&quot;highlighter-rouge&quot;&gt;addWebapp(String contextPath, String baseDir)&lt;/code&gt; method, setting the webapp’s context path and specifying the location of the webapp folder for baseDir.&lt;/p&gt;

&lt;p&gt;Once you are configured, you can call the &lt;code class=&quot;highlighter-rouge&quot;&gt;start()&lt;/code&gt; method.  Then you need to make sure your app doesn’t exit, the simplest way is to do an infinite loop, e.g. &lt;code class=&quot;highlighter-rouge&quot;&gt;while(true) { Thread.sleep(999999999); }&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;necessary-jar-files&quot;&gt;Necessary JAR files&lt;/h2&gt;

&lt;p&gt;From the Tomcat 7.0.2 distribution, I put the following jar files in my classpath (not sure if &lt;em&gt;all&lt;/em&gt; of them are necessary):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;annotations-api.jar&lt;/li&gt;
  &lt;li&gt;catalina-ant.jar&lt;/li&gt;
  &lt;li&gt;catalina-ha.jar&lt;/li&gt;
  &lt;li&gt;catalina-tribes.jar&lt;/li&gt;
  &lt;li&gt;catalina.jar&lt;/li&gt;
  &lt;li&gt;ecj-3.6.jar&lt;/li&gt;
  &lt;li&gt;el-api.jar&lt;/li&gt;
  &lt;li&gt;jasper-el.jar&lt;/li&gt;
  &lt;li&gt;jasper.jar&lt;/li&gt;
  &lt;li&gt;jsp-api.jar&lt;/li&gt;
  &lt;li&gt;servlet-api.jar&lt;/li&gt;
  &lt;li&gt;tomcat-api.jar&lt;/li&gt;
  &lt;li&gt;tomcat-coyote.jar&lt;/li&gt;
  &lt;li&gt;tomcat-dbcp.jar&lt;/li&gt;
  &lt;li&gt;tomcat-i18n-es.jar&lt;/li&gt;
  &lt;li&gt;tomcat-i18n-fr.jar&lt;/li&gt;
  &lt;li&gt;tomcat-i18n-ja.jar&lt;/li&gt;
  &lt;li&gt;tomcat-juli.jar&lt;/li&gt;
  &lt;li&gt;tomcat-util.jar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;tomcat-juli.jar was found in the &lt;code class=&quot;highlighter-rouge&quot;&gt;TOMCAT_HOME/bin&lt;/code&gt; folder, whereas the rest were in the &lt;code class=&quot;highlighter-rouge&quot;&gt;TOMCAT_HOME/lib&lt;/code&gt; folder&lt;/li&gt;
  &lt;li&gt;servlet-api.jar is for the Servlet 3.0 spec.  Make sure you don’t have any Servlet 2.x versions of this jar, otherwise Tomcat will throw an exception and fail to work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;example&quot;&gt;Example&lt;/h2&gt;

&lt;p&gt;Here is a little example app that assumes you have a webapp (WEB-INF with a web.xml in it) in the folder &lt;code class=&quot;highlighter-rouge&quot;&gt;examplewebapp&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.io.File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.io.IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.lang.InterruptedException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javax.servlet.ServletException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;org.apache.catalina.LifecycleException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;org.apache.catalina.startup.Tomcat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;TomcatEmbedExample&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 
        &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ServletException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; 
               &lt;span class=&quot;n&quot;&gt;LifecycleException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;InterruptedException&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;currentDir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getCanonicalPath&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tomcatDir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;currentDir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;separatorChar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;tomcat&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;webRoot&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;currentDir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;separatorChar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;examplewebapp&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;Tomcat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tomcat&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Tomcat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;tomcat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setBaseDir&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tomcatDir&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;tomcat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setPort&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4040&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;tomcat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;addWebapp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/examplewebapp&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;webRoot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// or we could do this for root context:&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// tomcat.addWebapp(&quot;/&quot;, webRoot);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;tomcat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Thread&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;999999999&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;ideas-on-what-this-can-be-used-for&quot;&gt;Ideas on what this can be used for&lt;/h2&gt;

&lt;p&gt;This has replace embedded Jetty as my development server.  I run it inside of a debugger (Eclipse), and Java hot code replace works nicely.  One thing that I am experimenting with is monitoring specific files to know when to restart the app.  I am currently using &lt;a href=&quot;http://jnotify.sourceforge.net/&quot;&gt;JNotify&lt;/a&gt; to monitor file changes, and restart the app when XML files or other configuration files change that need a restart to get applied.  It is working great so far, and I no longer have to manually restart the server or sacrifice Java hot code replace.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>New site using Jekyll static site generator</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2010/08/16/new-site-using-jekyll.html"/>
   <updated>2010-08-16T00:00:00-04:00</updated>
   <id>http://nileshk.com/2010/08/16/new-site-using-jekyll</id>
   <content type="html">&lt;p&gt;I have switched from using &lt;a href=&quot;http://drupal.org/&quot;&gt;Drupal&lt;/a&gt; for my blog to using &lt;a href=&quot;http://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt;, a static site generator.  Drupal has served me well for the last 6 years, but for this site it has been overkill and keeping up with the frequent security updates has been a chore.&lt;/p&gt;

&lt;h3 id=&quot;how-this-works&quot;&gt;How this works&lt;/h3&gt;

&lt;p&gt;What Jekyll does is use templates to generate static HTML pages.  This means for each update to my site, I simply redeploy a new set of static HTML pages that I have generated using Jekyll.  I am storing my site data in a &lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; repository.  On the server, I use an update script to fetch the latest from Git, and generate the new version of the site.&lt;/p&gt;

&lt;p&gt;I also store and work on my site data in my &lt;a href=&quot;https://www.dropbox.com/referrals/NTE0MjUzNjQ5&quot;&gt;Dropbox&lt;/a&gt; folder.  I work on this site on more than one computer, and relying on a SCM alone to synchronize would be way too cumbersome.  Dropbox has been great for automatically synchronizing the project between machines, and seems to handle synchronizing Git metadata fine.  I’m actually doing this for all my personal projects these days.&lt;/p&gt;

&lt;h3 id=&quot;my-old-workflow-with-drupal&quot;&gt;My old workflow with Drupal&lt;/h3&gt;

&lt;p&gt;My workflow for writing entries in Drupal was to edit posts in &lt;a href=&quot;http://www.gnu.org/software/emacs/&quot;&gt;Emacs&lt;/a&gt; using &lt;a href=&quot;http://jblevins.org/projects/markdown-mode/&quot;&gt;markdown-mode&lt;/a&gt; (as I was using &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt; for posts, though initially I was using filtered HTML).  Once a post was in Drupal, if I needed to make changes, I would use the Firefox extension &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/394/&quot;&gt;ViewSourceWith&lt;/a&gt; to conveniently load the entry back into Emacs, edit it, then have it auto-load it back into the browser textbox once I was done editing.  This worked, but it’s not as convenient or straightforward as editing a file sitting on my hard drive.&lt;/p&gt;

&lt;h3 id=&quot;advantages&quot;&gt;Advantages&lt;/h3&gt;

&lt;p&gt;With Jekyll, all posts are stored in files, so naturally the normal workflow is to edit files directly with a text editor.  I expect this to be a lot nicer than working with a web interface.&lt;/p&gt;

&lt;p&gt;Security is less of an issue with static HTML files.  I only need to worry about security updates to the web server I am using, which is much less frequent than that of the typical PHP app such as Drupal (or Wordpress for that matter).&lt;/p&gt;

&lt;p&gt;Though this site has never seen any heavy traffic that would test the limits of the server it was hosted on, I expect the performance of the static site to be much better than that of what a PHP / MySQL app can achieve (without proper caching at least).&lt;/p&gt;

&lt;p&gt;I feel like I more empowered to customize and modify my site’s layout because it’s just HTML/CSS/JavaScript with a simple template engine (Jekyll uses &lt;a href=&quot;http://www.liquidmarkup.org/&quot;&gt;Liquid&lt;/a&gt;).&lt;/p&gt;

&lt;h3 id=&quot;switched-from-shared-hosting-to-a-vps&quot;&gt;Switched from shared hosting to a VPS&lt;/h3&gt;

&lt;p&gt;In this process I have also moved the site from a shared hosting provider to a Linux VPS (&lt;a href=&quot;http://www.linode.com/?r=00acb2139b7de30d5754c91bdabbe2d808c2e453&quot;&gt;Linode&lt;/a&gt;).  I am using &lt;a href=&quot;http://wiki.nginx.org/&quot;&gt;nginx&lt;/a&gt; as the web server, whereas my previous host was using Apache.&lt;/p&gt;

&lt;p&gt;Now that this is all in place, I need to get back to writing blog entries…&lt;/p&gt;

&lt;h3 id=&quot;script-for-drupal-to-jekyll-conversion&quot;&gt;Script for Drupal to Jekyll conversion&lt;/h3&gt;

&lt;p&gt;It is in no way complete, but I wrote this script for converting Drupal posts to Jekyll: &lt;a href=&quot;http://gist.github.com/528382&quot;&gt;jekyll_drupal_conversion.rb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is rather specific to my site, and may not work with someone else’s Drupal site, but could be a good starting point if you are looking for a conversion script.  Be prepared to modify it if you plan to use this.&lt;/p&gt;

&lt;p&gt;The script attempts to convert Drupal’s Filtered HTML format to normal HTML, but those HTML files probably needed additional work.  It also attempts to convert the syntax highlighting tags I was using to those for Jekyll’s liquid tags which uses &lt;a href=&quot;http://pygments.org/&quot;&gt;pygments&lt;/a&gt;, a Python based syntax highlighter.  I actually ended up manually converting most of my HTML posts to markdown in the end.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>The Rise of the Web OS</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/07/08/rise-of-the-web-os.html"/>
   <updated>2009-07-08T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/07/08/rise-of-the-web-os</id>
   <content type="html">&lt;p&gt;I’ve been thinking about personal computers in general and its usage by non-technical people.  Things are far from ideal, with Microsoft not getting any closer to making computing accessible to regular people, yet still remaining the dominant computing platform.  But in observing the recent occurrences and in thinking about the future of personal computing, I think we are poised for a change.  With the recent &lt;a href=&quot;http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html&quot;&gt;announcement of Google Chrome OS&lt;/a&gt;, I have some (long, rambling) thoughts on the subject which include why a web OS is the likely next step in personal computing and some predictions on it:
&lt;!--break--&gt;
The Problem
———–&lt;/p&gt;

&lt;p&gt;Let’s face it, personal computers are too difficult to use.  The average non-technical person has difficulty using personal computers, regardless of whether they are using Windows, Mac OS X, or Linux (though the Mac OS X users are marginally better off).  If a non-technical user isn’t having any problems its probably because they have a very thorough technical person managing things for them.  Even the highly technical person who spends 60/hours a week using personal computers is going to run into some problem that is going to require a good deal of effort on their part to troubleshoot.  Having troubleshooting skills is in fact a requirement to be able to use personal computers without help.  But why should it be?&lt;/p&gt;

&lt;h2 id=&quot;why-are-personal-computers-such-a-pain&quot;&gt;Why Are Personal Computers Such a Pain?&lt;/h2&gt;

&lt;p&gt;Why are personal computers such a pain?  One word: Complexity.  Ridiculous amounts of complexity.  Windows users have to deal with often difficult non-standardized software installation processes, having to install hardware drivers which are often of poor quality and difficult to install and use, having to edit the registry when things go wrong with updates, having to protect themselves from malware, etc.  OS X users have a significantly better experience in these areas, but things are nowhere near perfect.  Many Linux users sacrifice being to able to use the latest versions of software in the interest of simplicity as provided by their package managers.  In all cases software updates and installations can and will cause problems.  People are afraid to update their software as they have been burned by updates screwing things up.  There are so many “moving parts” in a typical desktop operating system that there is a high likelihood that something will go wrong.&lt;/p&gt;

&lt;p&gt;Complexity in the user interfaces increases the pain.  Even OS X can only get so far in making a complex interfaces accessible.&lt;/p&gt;

&lt;h2 id=&quot;what-we-need-in-a-solution&quot;&gt;What We Need in a Solution&lt;/h2&gt;

&lt;p&gt;The opposite of complexity is of course simplicity.  To make computers accessible and manageable by everyone, we need to make them significantly more simple.&lt;/p&gt;

&lt;p&gt;The user needs to interact as little as possible with functions that are not purely just using the applications they wish to use.  They need to forget about the intricacies of software installation, updates, hardware setup, and even managing individual files.&lt;/p&gt;

&lt;p&gt;The web offers to push many of these problems to the server, where there are technical people handling the issues instead of end users.  And the users only have to worry about keeping their web browser updated (assuming the web sites don’t require some obscure plugins) and figuring out whatever UI the web sites offer.  Even installing a decent web browser and keeping it updated appears to be a challenge for the majority of people, though.&lt;/p&gt;

&lt;p&gt;What we need is a focused device that has a modern web browser (not Internet Explorer) and makes keeping that web browser updated as easy as possible if not completely automatic.  And the web browser needs to be a first class citizen in the device’s user interface.&lt;/p&gt;

&lt;h2 id=&quot;the-browser-interface-needs-to-change&quot;&gt;The Browser Interface Needs to Change&lt;/h2&gt;

&lt;p&gt;The iPhone and Google Android start to hint at what this might be like, but they don’t go far enough.  What I mean by the web browser needs to be a first class citizen in the device’s user interface is that the &lt;em&gt;web applications&lt;/em&gt; need to be the focus of the interface.  Want to get your web mail or todo list?  They should each be directly accessible from the main interface and you should be able to easily return the currently open session you have for the web application.&lt;/p&gt;

&lt;p&gt;To take the example of the iPhone, the web application should be an icon on the home screen (which you can do), but instead of opening up the browser application and either opening a new page or switching a currently open page if it exists, it should just open up to the web applications.  Admittedly, the iPhone’s way of handling this is good enough, but if we are going to build a whole device around browsing the web, we need to lose the idea of the web browser being an individual application.  The web browser is no longer the application, the &lt;em&gt;web applications&lt;/em&gt; are.  Those of you who are familiar with &lt;a href=&quot;http://prism.mozilla.com/&quot;&gt;Mozilla Prism&lt;/a&gt; you know what I’m talking.&lt;/p&gt;

&lt;p&gt;I really hope that Google Chrome OS and any other emerging “web OS” gets this part right.&lt;/p&gt;

&lt;h2 id=&quot;whats-wrong-with-traditional-applications&quot;&gt;What’s Wrong With Traditional Applications?&lt;/h2&gt;

&lt;p&gt;A common response is that what’s wrong with traditional native/desktop applications (on the desktop or for specific devices such as iPhone apps).  Why would you want to &lt;em&gt;only&lt;/em&gt; use web apps?  Well, we are making a sacrifice in the name of making things easier, but I think in the long run this sacrifice will be worth it.  There are a number of problems which web applications and a web OS can solve:&lt;/p&gt;

&lt;h3 id=&quot;cross-platform&quot;&gt;Cross Platform&lt;/h3&gt;

&lt;p&gt;Native/desktop apps are either not cross platform, have separate builds for various platforms, or use a cross-platform toolkit or runtime.  But even using a cross-platform toolkit or runtime only puts it on a limited number of devices.  Web browsers on the other hand are &lt;em&gt;everywhere&lt;/em&gt;.  This may seem like an issue that only helps developers, and it does help developers as they can just make a web version and instantly have their applications available on more devices than any other method of app delivery would.  But as a user, this gives you choice in where you can use the application.  A web application can be used from all of your desktop computers, your netbook, your phone, etc.  And it doesn’t matter which brand of device and OS you are using, as long as a competent web browser is available for it.&lt;/p&gt;

&lt;h3 id=&quot;updates&quot;&gt;Updates&lt;/h3&gt;

&lt;p&gt;Users of web applications no longer have to worry about updates.  They are automatically using the current version.  Granted, this means the service provider is in control of what versions the users use, but its a trade-off that significantly reduces the work the users have to do.&lt;/p&gt;

&lt;p&gt;A “web OS” that is basically just an interface around web browsing has a lot less to worry about updating.  It’s main concern will be updating the web browser (especially security updates).  There may also be some less frequent updates to things like the general user interface, the hardware drivers, etc.  There’s no guarantee that updates won’t break things, but the less to update the better.&lt;/p&gt;

&lt;h3 id=&quot;convenience&quot;&gt;Convenience&lt;/h3&gt;

&lt;p&gt;I’ve already mentioned how you can use web apps on just about any device.  Did I mention you could use them on &lt;em&gt;any&lt;/em&gt; device?  What I mean is that for most web apps you don’t have to carry around all your data as its stored on a server.  So you can get on any internet-connected device with a browser to use a web app and have all your data available to you.&lt;/p&gt;

&lt;h3 id=&quot;inter-application-connectivity&quot;&gt;Inter-Application Connectivity&lt;/h3&gt;

&lt;p&gt;Web applications offer connectivity between each other in ways desktop apps can only scratch the surface of.  This is a minor point at present, but we will see much more of it in the future.&lt;/p&gt;

&lt;h2 id=&quot;web-applications-can-have-all-the-power-of-native-apps&quot;&gt;Web Applications Can Have All the Power of Native Apps&lt;/h2&gt;

&lt;p&gt;If done right (both the web OS and the web application), web applications have the potential to provide an identical experience to desktop apps.  Most of this is thanks to the use of plugins which give browsers functionality outside of what the web standards provide.  While plugins start to erode the benefit that standards-compliant web browsers provide, I think they are necessary to push browsers into desktop territory.  I think they could be a good thing if they are open source and accessible via standard web technology (JavaScript or HTML).  I think Flash, Java, and Silverlight go a little too far away from the standard web technologies to be used prevalently (and their main implementations are not open source and are non-trivial to duplicate), but they do currently fill in missing pieces such as watching video, playing audio, and accessing webcams/microphones.  But I think plugins that extend and build upon the standard web tech is a better idea than a plugin that provides an entirely different and separate runtime.  Maybe things will look different 10 years from now.&lt;/p&gt;

&lt;h3 id=&quot;local-storage&quot;&gt;Local Storage&lt;/h3&gt;

&lt;p&gt;Google Gears or HTML5 provide local storage.  This answers some of the complaints about not having your data local, though it seems to be more often used for caching data locally (for offline use or for fast access) then as the primary means of storage.&lt;/p&gt;

&lt;h3 id=&quot;google-native-client&quot;&gt;Google Native Client&lt;/h3&gt;

&lt;p&gt;I almost view Google’s &lt;a href=&quot;http://code.google.com/p/nativeclient/&quot;&gt;Native Client&lt;/a&gt; as cheating, as it removes the cross platform advantage.  And the security implications are not to be taken lightly.  But it does open up a huge amount of possibilities.&lt;/p&gt;

&lt;p&gt;I’m not sure what the best way to approach actual plugins in web OS.  The problem is that they are basically native applications.  If you open up a web OS to allowing installation of arbitrary plugins, there is the potential for losing the advantages that a web OS is pushing (especially the cross platform advantage).  Maybe its better for the web OS vendor to be in control of this.&lt;/p&gt;

&lt;p&gt;Unfortunately, the locked down nature of the iPhone may actually be a good model for a web OS.  Though ideally, the locked down should only be on the surface.  The web OS would ideally be open source and allow for those wishing to break out of the lock down to be able to do so; but this is not something that the average user should be doing.&lt;/p&gt;

&lt;h2 id=&quot;not-everything-is-perfect-in-web-os-land&quot;&gt;Not Everything is Perfect in Web OS Land&lt;/h2&gt;

&lt;p&gt;Of course, a “Web OS” is a trade-off and there are going to be disadvantages over traditional desktop/native software.  Here are a few of the disadvantages:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Despite the possibility of local storage, in general, using web applications involves trusting a third party to store your data.  This raises privacy concerns in some situations.  Another problem is that you are trusting the third party to maintain integrity and reliability of your data.  But I think most of these services are much better about backing up than the average user (though there is sometimes the odd web service that loses all its data and had never made a backup).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Security is a more significant issue on the internet.  While viruses and malware can reach desktop applications, your data that is stored by third parties is open to attack 24/7, while your the data on your personal computer is only open to attack when your computer is on and connected to the internet.  The security of the web browser is especially important, but I don’t think that is anything new.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Browser-based web apps are still catching up to native desktop apps.  Even with Flash and Silverlight it’s difficult to deliver the same experience that native apps can deliver.  I think in time we may see all the missing pieces get filled in, but this will be a slow process.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;User interfaces are more the responsibility of the web applications.  There is much less standardization among web apps.  Similarities among the UI for web applications is generally due to them copying each other and not as much anything inherent in the platform (though there is a bit of it that is due to the platform).  You don’t get the same kind of uniformity you would get with a toolkit such as Cocoa or GTK+ once you get into the more “rich” web applications.  Maybe this is all a good thing and that more variations in UI will cause more rapid improvements in UI.  But there is something to be said for having a consistent UI across applications that you use, especially for things like keyboard shortcuts.  I hope that some consistency arrives for keyboard shortcuts in web applications, because the current state of keyboard shortcuts are not very good.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But these are all tradeoffs and not show-stopping problems.&lt;/p&gt;

&lt;h2 id=&quot;not-for-everyone-and-every-task&quot;&gt;Not For Everyone and Every Task&lt;/h2&gt;

&lt;p&gt;Let’s be clear, the web OS isn’t necessarilly going to be for everyone and every kind of task.  The traditional desktop OS is still going to be alive and well and in use for a long time.  But the web OS is going to become ubiquitous like televisions and telephones are.  Though some of the devices it will end up on may be typical desktop and notebook computers, it will be even more prevalent on devices like small tablets and small notebooks (“netbooks” as they are currently called).  I guess I sort of see the iPhone, Android, and the Palm Pre as devices that can be or are at least partially a “web OS”.  And we are seeing Android being used in places where I think a “web OS” is appropriate.&lt;/p&gt;

&lt;p&gt;It’s interesting that Google is creating a whole separate OS from Android, but I guess if you are really going to create a “web OS” there is no need for many of the things that Android provides.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;So in conclusion, a “web OS” needs the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A competent modern web browser&lt;/li&gt;
  &lt;li&gt;Web applications need to be first class citizens&lt;/li&gt;
  &lt;li&gt;Automatic or extremely easy updates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If done correctly, I think this could be a good thing in that it could make personal computers much more accessible.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>VMWare Fusion: Assigning IP Addresses for NAT-Configured VMs via DHCP and Port Forwarding</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/06/24/vmware-fusion-nat-dhcp-and-port-forwarding.html"/>
   <updated>2009-06-24T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/06/24/vmware-fusion-nat-dhcp-and-port-forwarding</id>
   <content type="html">&lt;p&gt;In VMWare Fusion, when using NAT, you often times want the IP addresses for the VMs to always be the same, so that you can connect to them from the host using the same IP address every time (and probably assign an entry in your /etc/hosts file).  You may also want to connect to the host from the guests using a constant IP address.  And finally, with VMs that use NAT, you may want to setup port forwarding so that machines outside of the host can connect to services on your VM (and this relies on the IP addresses remaining the same).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: The instructions for VMWare Fusion 4 also apply to version 5&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The configuration files for doing this reside in &lt;code&gt;/Library/Preferences/VMware Fusion/vmnet8&lt;/code&gt; for &lt;strong&gt;VMWare Fusion 4&lt;/strong&gt; and later, and &lt;code&gt;/Library/Application Support/VMware Fusion/vmnet8/&lt;/code&gt; for &lt;strong&gt;VMWare Fusion 3&lt;/strong&gt; and later (the NAT interface is called “vmnet8” hence why configuration for it is here).  The files are specifically &lt;code&gt;dhcpd.conf&lt;/code&gt; and &lt;code&gt;nat.conf&lt;/code&gt;.  These files may be read-only (even for root), so make sure to give root write permission before you edit them.&lt;/p&gt;

&lt;p&gt;Note that any changes to these files requires a restart of the VMWare’s networking.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;VMWare Fusion 4&lt;/strong&gt; and later, simply restart the app.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;VMWare Fusion 3&lt;/strong&gt; and earlier, run this script:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;sudo &lt;span class=&quot;s2&quot;&gt;&quot;/Library/Application Support/VMware Fusion/boot.sh&quot;&lt;/span&gt; --restart&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;!--break--&gt;

&lt;h2 id=&quot;assigning-consistent-ip-addresses&quot;&gt;Assigning consistent IP addresses&lt;/h2&gt;

&lt;p&gt;As explained by &lt;a href=&quot;http://www.thirdbit.net/articles/2008/03/04/dhcp-on-vmware-fusion/&quot;&gt;this blog entry&lt;/a&gt; you can edit the &lt;code&gt;dhcpd.conf&lt;/code&gt; file to configure VMWare Fusion’s DHCP server to assign specific IP addresses to a VM based on its MAC address.  You should see something like this in your dhcpd.conf file:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;subnet 192.168.87.0 netmask 255.255.255.0 &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    range 192.168.87.128 192.168.87.254;
    option broadcast-address 192.168.87.255;
    option domain-name-servers 192.168.87.2;
    option netbios-name-servers 192.168.87.2;
    option domain-name &lt;span class=&quot;s2&quot;&gt;&quot;localdomain&quot;&lt;/span&gt;;
    option routers 192.168.87.2;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;For our IP address assignments, we want to pick an IP address that is &lt;strong&gt;outside&lt;/strong&gt; of the range that is set above.  So in my case I picked 192.168.87.100 and 192.168.87.101 for two VMs that I wanted to configure.&lt;/p&gt;

&lt;p&gt;We also need to get the MAC addresses for the VMs.  We can either get it from the VM’s &lt;code&gt;.vmx&lt;/code&gt; file under the property &lt;code&gt;ethernet0.generatedAddress&lt;/code&gt; or if the VM is currently running we can run &lt;code&gt;ipconfig&lt;/code&gt; if it is UNIX/Linux or &lt;code&gt;ipconfig /all&lt;/code&gt; if it is Windows.&lt;/p&gt;

&lt;p&gt;So if we were to configure two VM’s to have fixed IP addresses, we would add something like this to the &lt;code&gt;dhcpd.conf&lt;/code&gt; file:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;host uvm &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    hardware ethernet 00:0c:29:02:00:f1;
    fixed-address 192.168.87.100;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

host wvm &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    hardware ethernet 00:0c:29:44:57:46;
    fixed-address 192.168.87.101;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I put entries in my /etc/hosts to point to these, so I don’t have to remember IP addresses:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Ubuntu VM&lt;/span&gt;
192.168.87.100        uvm
&lt;span class=&quot;c&quot;&gt;# Windows XP VM&lt;/span&gt;
192.168.87.101        wvm&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;connecting-to-the-host-from-the-guests&quot;&gt;Connecting to the host from the guests&lt;/h2&gt;

&lt;p&gt;Since the host acts as a router, we can use the router IP address as configured in &lt;code&gt;dhcpd.conf&lt;/code&gt; to connect to the host from our VMs.  From the above excerpt, this is the line that describes what the router IP address is:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;    option routers 192.168.87.2;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And inside of the VMs, I add an entry to my &lt;code&gt;/etc/hosts&lt;/code&gt; file so I don’t have to remember this IP address.  Note that the VMs can see each other, so it’s a good idea to put IP addresses of other VMs in &lt;code&gt;/etc/hosts&lt;/code&gt; as well if you are going to make connections between VMs.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;VMWare Fusion 4&lt;/strong&gt; and later, guests need to connect to &lt;code&gt;x.x.x.1&lt;/code&gt; instead of &lt;code&gt;x.x.x.2&lt;/code&gt;, so this example would look like this for VMWare Fusion 4:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# As derived from the VMWare host's dhcp.conf (VMWare Fusion 4 and later)&lt;/span&gt;
192.168.87.1    vmhost
&lt;span class=&quot;c&quot;&gt;# Ubuntu VM&lt;/span&gt;
192.168.87.100    uvm&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;For &lt;strong&gt;VMWare Fusion 3&lt;/strong&gt; and earlier, we use the router address as it is:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# As defined in the VMWare host's dhcp.conf (VMWare Fusion 3 and earlier)&lt;/span&gt;
192.168.87.2    vmhost
&lt;span class=&quot;c&quot;&gt;# Ubuntu VM&lt;/span&gt;
192.168.87.100    uvm&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;port-forwarding&quot;&gt;Port forwarding&lt;/h2&gt;

&lt;p&gt;To make services in NAT-configured VMs available outside of the host OS, we need to set up port forwarding.  To do this edit the &lt;code&gt;nat.conf&lt;/code&gt; file.  Add entries under &lt;code&gt;[incomingtcp]&lt;/code&gt; if you are forwarding a TCP connection and under &lt;code&gt;[incomingudp]&lt;/code&gt; for a UDP connection.  There are examples in this file, but to go along with our above examples, we might do something like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;incomingtcp]
&lt;span class=&quot;c&quot;&gt;# Forward host port 2222 to SSH on Ubuntu VM&lt;/span&gt;
2222 &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 192.168.87.100:22
&lt;span class=&quot;c&quot;&gt;# Forward Remote Desktop connections to Windows VM&lt;/span&gt;
3389 &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 192.168.87.101:3389

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;incomingudp]
&lt;span class=&quot;c&quot;&gt;# Forward Remote Desktop connections to Windows VM&lt;/span&gt;
3389 &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 192.168.87.101:3389&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;restarting-vmware-services-on-host&quot;&gt;Restarting VMWare services on host&lt;/h2&gt;

&lt;p&gt;Don’t forget to restart after we make any of the above changes.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;VMWare Fusion 4&lt;/strong&gt;, we simply restart the app.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;VMWare Fusion 3&lt;/strong&gt; and earlier, we need to restart the VMWare services using this command:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;sudo &lt;span class=&quot;s2&quot;&gt;&quot;/Library/Application Support/VMware Fusion/boot.sh&quot;&lt;/span&gt; --restart&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</content>
 </entry>
 
 <entry>
   <title>Prompt Before Closing Emacs</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/06/13/prompt-before-closing-emacs.html"/>
   <updated>2009-06-13T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/06/13/prompt-before-closing-emacs</id>
   <content type="html">&lt;p&gt;I developed a bad habit of quitting Emacs from my earlier days of using Emacs mostly in a terminal session (where even there quitting it is not the best idea).  Using GUI versions of Emacs, I sometimes find myself hitting &lt;code class=&quot;highlighter-rouge&quot;&gt;C-x C-c&lt;/code&gt; and wishing I didn’t because I really intended to kill the current buffer, not completely close Emacs.  So what I have done to deal with this is, when running a GUI version (which can be detected by checking the &lt;code class=&quot;highlighter-rouge&quot;&gt;window-system&lt;/code&gt; variable), I always prompt to ask if I really want to quit.  Here is the code I use:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-scheme&quot; data-lang=&quot;scheme&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;ask-before-closing&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;&quot;Ask whether or not to close, and then close if y was pressed&quot;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;interactive&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;y-or-n-p&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;format&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Are you sure you want to exit Emacs? &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;emacs-major-version&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;save-buffers-kill-terminal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;save-buffers-kill-emacs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Canceled exit&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;window-system&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;global-set-key&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;kbd&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;C-x C-c&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;'ask-before-closing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I do this only for the GUI version, but you could remove the check for &lt;code class=&quot;highlighter-rouge&quot;&gt;window-system&lt;/code&gt; if you want it to work in the terminal version as well.  I use &lt;code class=&quot;highlighter-rouge&quot;&gt;when&lt;/code&gt; instead of &lt;code class=&quot;highlighter-rouge&quot;&gt;if&lt;/code&gt; in this case, because I do other things if I am running the GUI version, like &lt;code class=&quot;highlighter-rouge&quot;&gt;(server-start)&lt;/code&gt;, which I have excluded from this code sample.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>SVN in Eclipse: Subversive and SVNKit for Subversion 1.6</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/06/05/svn-in-eclipse-subversive-and-svnkit-for-subversion.html"/>
   <updated>2009-06-05T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/06/05/svn-in-eclipse-subversive-and-svnkit-for-subversion</id>
   <content type="html">Previously &lt;a href=&quot;/2005/11/22/subclipse-in-ubuntu-linux.html&quot;&gt;I had blogged about&lt;/a&gt; using JavaHL in Linux.  &lt;a href=&quot;http://subclipse.tigris.org/wiki/JavaHL&quot;&gt;JavaHL&lt;/a&gt; is the bindings to the native Subversion libraries which uses JNI, and it sometimes requires a bit of effort to get working.  I no longer find using JavaHL necessary as I no longer have problems with the pure Java library &lt;a href=&quot;http://svnkit.com/&quot;&gt;SVNKit&lt;/a&gt; (formerly known as JavaSVN).  I also have switched to &lt;a href=&quot;http://www.eclipse.org/subversive/&quot;&gt;Subversive&lt;/a&gt; instead of Subclipse because I have found it to be less problematic.&lt;br&gt;
&lt;br&gt;
Despite being an official Eclipse project now, Subversive won't install from Eclipse 3.4's default repository, and you still need to get some plugins directly from Polarion.  If you want to use the latest Subversive and SVNKit that supports Subversion 1.6, add the following update sites:&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;&lt;br&gt;
&lt;li&gt;&lt;a href=&quot;http://download.eclipse.org/technology/subversive/0.7/update-site/&quot;&gt;http://download.eclipse.org/technology/subversive/0.7/update-site/&lt;/a&gt;&lt;/li&gt;&lt;br&gt;
&lt;li&gt;&lt;a href=&quot;http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/&quot;&gt;http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/&lt;/a&gt;&lt;/li&gt;&lt;br&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;br&gt;
And then install the following from those update sites:&lt;br&gt;
&lt;ul&gt;&lt;br&gt;
&lt;li&gt;Subversive SVN Connectors (2.2.0)&lt;/li&gt;&lt;br&gt;
&lt;li&gt;Subversive SVN Team Provider (0.7.8)&lt;/li&gt;&lt;br&gt;
&lt;li&gt;SVNKit 1.3.0 Implementation (2.2.0)&lt;/li&gt;&lt;br&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;br&gt;
Note that the version numbers will change in the future, but these are the current versions that work with 1.6.&lt;br&gt;
</content>
 </entry>
 
 <entry>
   <title>URL Shortener Web Application Using Django</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/06/02/url-shortener-web-app-using-django.html"/>
   <updated>2009-06-02T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/06/02/url-shortener-web-app-using-django</id>
   <content type="html">I created a URL shortener web application using &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt; (a Python web framework).  I have made the &lt;b&gt;&lt;a href=&quot;http://github.com/nileshk/url-shortener&quot;&gt;source code available on GitHub&lt;/a&gt;&lt;/b&gt; and it is under an open source license (MIT license).&lt;br&gt;
&lt;br&gt;
The shortened URLs use the base 62 value of ids of the model they are stored in, using the code from &lt;a href=&quot;http://www.djangosnippets.org/snippets/1431/&quot;&gt;here&lt;/a&gt; (it uses A-Z, a-z, and 0-9), which should be fairly compact for a long time.  A count of how many times the URLs are used is kept.  The main page shows the 10 most recent and 10 most popular URLs.&lt;br&gt;
&lt;br&gt;
You can see a running instance at &lt;a href=&quot;http://n1l.us/&quot;&gt;n1l.us&lt;/a&gt; (which I am using to link to this blog and other links to my own content) and &lt;a href=&quot;http://uu4.us/&quot;&gt;uu4.us&lt;/a&gt; (which I am using for all other URLs).  I currently don't allow public submissions of URLs on either of those sites, but I will be opening it up for &lt;a href=&quot;http://uu4.us/&quot;&gt;uu4.us&lt;/a&gt; at some point (perhaps once I add some defenses against spammers).  The application itself has a configuration option to be able to require or not require login to be able to submit URLs (the REQUIRE_LOGIN setting in settings.py).  Note that if you require logins, you have to use the admin app (at /admin/) as I have not created a separate login page.&lt;br&gt;
&lt;br&gt;
I've so far done the bare minimum as far as HTML/JavaScript is concerned (and there is no CSS to speak of yet).  Just enough to get things working.  So don't expect a good looking site with this yet.  It does produce a functional bookmarklet, assuming that you set SITE_NAME correctly for your site.  Though I should probably make the bookmarklet check for &lt;a href=&quot;http://simonwillison.net/2009/Apr/11/revcanonical/&quot;&gt;rev=canonical&lt;/a&gt; to be a good web citizen.&lt;br&gt;
&lt;!--break--&gt;&lt;br&gt;
This was developed using the current Django from SVN.  I don't believe I used any features specific to 1.1, so it may work with 1.0.x, but I'm not absolutely sure.&lt;br&gt;
&lt;br&gt;
Note that &lt;a href=&quot;http://github.com/jacobian/django-shorturls&quot;&gt;django-shorturls&lt;/a&gt; solves a different problem and is not a general URL shortener.  It is to be used in an existing Django application to automatically map short urls to specific model instances and to produce the &lt;code&gt;&lt;link rev=&quot;canonical&quot; href=&quot;...&quot;&gt;&lt;/code&gt; containing the short url in the templates.
</content>
 </entry>
 
 <entry>
   <title>The biggest issue with Adobe Flash Player</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/06/02/the-biggest-issue-with-adobe-flash-player.html"/>
   <updated>2009-06-02T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/06/02/the-biggest-issue-with-adobe-flash-player</id>
   <content type="html">&lt;b&gt;Update:&lt;/b&gt; Looks like they &lt;a href=&quot;http://www.adobe.com/devnet/logged_in/jchurch_flashplayer10.1.html?devcon=f2&quot;&gt;have fixed this&lt;/a&gt; in &lt;a href=&quot;http://labs.adobe.com/technologies/flashplayer10/&quot;&gt;Flash Player&lt;/a&gt; 10.1&lt;br&gt;
&lt;br&gt;
The biggest issue with Flash Player at the moment is that there is no way to create a top-level exception handler.  What this means is that there will be exceptions (errors) that you simply cannot trap in your application code, even if you put try/catch all over your code (and especially if you are using Flex's MXML).  This means that &lt;b&gt;creating things like an error reporting tool are impossible&lt;/b&gt; for applications that run in the Flash Player (that includes AIR apps, too, not just browser apps).  If you are running the debug version of the Flash Player, you will see uncaught exceptions, but the typical user is not going to be running the debug version.  In the regular version of the Flash Player, uncaught exceptions just fail silently (often causing strange behavior), giving no indication to the user that an error occurred.&lt;br&gt;
&lt;br&gt;
There is an issue in Adobe's issue tracker for this:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://bugs.adobe.com/jira/browse/FP-444&quot;&gt;http://bugs.adobe.com/jira/browse/FP-444&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
It is the highest-voted issue specifically for the Flash Player.  It is only surpassed by &lt;a href=&quot;http://bugs.adobe.com/jira/browse/FB-19053&quot;&gt;the request to keep developing Flash Builder for Linux&lt;/a&gt;, which &lt;a href=&quot;/2009/05/03/future-of-flex-builder-for-linux-in-question.html&quot;&gt;I think is an important issue&lt;/a&gt;, but this issue is much more important.  If you haven't already, create an account on Adobe's issue tracker and vote for this issue.&lt;br&gt;
</content>
 </entry>
 
 <entry>
   <title>Bash Completion</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/05/23/bash-completion.html"/>
   <updated>2009-05-23T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/05/23/bash-completion</id>
   <content type="html">&lt;p&gt;The &lt;a href=&quot;http://en.wikipedia.org/wiki/Bash&quot;&gt;Bash&lt;/a&gt; shell does tab completion executables, bash commands, and files/folders out of box.  But it’s completion can be extended to support even more types of completion including arguments for commands and things like hostnames through the use of &lt;a href=&quot;http://www.gnu.org/software/bash/manual/bashref.html#Programmable-Completion&quot;&gt;programmable completion&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There is a package called &lt;a href=&quot;http://www.caliban.org/bash/index.shtml#completion&quot;&gt;bash-completion&lt;/a&gt; which includes a set of completions for various utilities.  For example, for &lt;a href=&quot;http://subversion.tigris.org/&quot;&gt;Subversion&lt;/a&gt;, if you type &lt;code class=&quot;highlighter-rouge&quot;&gt;svn &amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;&lt;/code&gt; (replacing &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; with actually pressing tab) it will give you a list of all the svn subcommands that are available.  If you type &lt;code class=&quot;highlighter-rouge&quot;&gt;svn rev&amp;lt;tab&amp;gt;&lt;/code&gt; it will complete it to &lt;code class=&quot;highlighter-rouge&quot;&gt;svn revert&lt;/code&gt;.  For ssh, if you type &lt;code class=&quot;highlighter-rouge&quot;&gt;ssh &amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;&lt;/code&gt; it will list all the hostnames and IP addresses it knows about (it looks like it uses a combination of what’s in &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/hosts&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.ssh/known_hosts&lt;/code&gt;).  You can of course do &lt;code class=&quot;highlighter-rouge&quot;&gt;ssh username@&amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;&lt;/code&gt; if you are using a specific username.&lt;/p&gt;

&lt;p&gt;Once the &lt;code class=&quot;highlighter-rouge&quot;&gt;bash-completion&lt;/code&gt; package is installed, you can copy additional completion scripts to &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/bash_completion.d&lt;/code&gt; and they will be automatically included.  I did this with the &lt;a href=&quot;http://maven.apache.org/guides/mini/guide-bash-m2-completion.html&quot;&gt;Maven 2.x completion script&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; has a completion script that is included in its standard distribution.  Find out where you have Git installed, and source the script &lt;em&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;GIT_INSTALL_DIR&lt;/code&gt;&lt;/em&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/contrib/completion/git-completion.bash&lt;/code&gt; in your &lt;code class=&quot;highlighter-rouge&quot;&gt;.bash_profile&lt;/code&gt;.  For example, I have Git installed via the &lt;a href=&quot;http://code.google.com/p/git-osx-installer/downloads/list?can=3&quot;&gt;binary installer for OS X Leopard&lt;/a&gt;, and thus I added this line to my &lt;code class=&quot;highlighter-rouge&quot;&gt;.bash_profile&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; /usr/local/git/contrib/completion/git-completion.bash&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Note that this is independent of the bash-completion package described above and does not require it (since we are sourcing it directly).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.djangoproject.com&quot;&gt;Django&lt;/a&gt; also has bash completion script included in its distribution.  Replacing &lt;code class=&quot;highlighter-rouge&quot;&gt;$DJANGO_DIR&lt;/code&gt; where you have the release extracted (or checked out from version control):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$DJANGO_DIR&lt;/span&gt;/extra/django_bash_completion&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;With this, you get completion for &lt;code class=&quot;highlighter-rouge&quot;&gt;django-admin.py&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;manage.py&lt;/code&gt;.  For &lt;code class=&quot;highlighter-rouge&quot;&gt;manage.py&lt;/code&gt; you need to set execute permissions and run it as &lt;code class=&quot;highlighter-rouge&quot;&gt;./manage.py&lt;/code&gt; on the command line rather than &lt;code class=&quot;highlighter-rouge&quot;&gt;python manage.py&lt;/code&gt; in order to get completion for it.
&lt;!--break--&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Suppress unchecked warnings on method calls in Java</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/05/21/suppress-unchecked-warnings-on-method-call-in-java.html"/>
   <updated>2009-05-21T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/05/21/suppress-unchecked-warnings-on-method-call-in-java</id>
   <content type="html">&lt;p&gt;Let’s say you have a method call like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;beanWrapper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getPropertyValue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And &lt;a href=&quot;http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/beans/PropertyAccessor.html#getPropertyValue(java.lang.String)&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;beanWrapper.getPropertyValue&lt;/code&gt;&lt;/a&gt;&amp;lt;/a&amp;gt; returns an Object.  If you have the “Unchecked generic type operation” compiler setting set to warning, you will get the following warning:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;safety:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Unchecked&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cast&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you are using Eclipse, it will give you a quick fix to add a &lt;code class=&quot;highlighter-rouge&quot;&gt;@SuppressWarnings(value = &quot;unchecked&quot;)&lt;/code&gt; annotation, but only give you the option to add it to the current method.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/eclipse_unchecked_quickfix.png&quot; alt=&quot;Unchecked quickfix&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(the current method in this case is &lt;code class=&quot;highlighter-rouge&quot;&gt;getBean()&lt;/code&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But we may not want to suppress warnings for the entire method.  We can just put the annotation on the method call itself:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@SuppressWarnings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;unchecked&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;beanWrapper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getPropertyValue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</content>
 </entry>
 
 <entry>
   <title>CXF SOAP client built using Maven</title>
   <author>
     <name>Nilesh Kapadia</name>
   </author>
   <link href="http://nileshk.com/2009/05/20/cxf-soap-client-using-maven.html"/>
   <updated>2009-05-20T00:00:00-04:00</updated>
   <id>http://nileshk.com/2009/05/20/cxf-soap-client-using-maven</id>
   <content type="html">&lt;p&gt;I recently created some SOAP web service clients using &lt;a href=&quot;http://cxf.apache.org/&quot;&gt;Apache CXF&lt;/a&gt; (which is a project that resulted from the merging of &lt;a href=&quot;http://xfire.codehaus.org/&quot;&gt;XFire&lt;/a&gt; and &lt;a href=&quot;http://celtix.ow2.org/&quot;&gt;Celtix&lt;/a&gt;).  Rather than hunt down all the jar files I needed and write an Ant script to do the build, I decided to use Maven for this.  It worked nicely and saved me some time (I can’t say the same for some of the more complex projects I’ve tried to use Maven with).&lt;/p&gt;

&lt;p&gt;I found the following blog entry very useful for setting this up:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://logicsector.wordpress.com/2008/10/19/how-to-create-a-wsdl-first-soap-client-in-java-with-cxf-and-maven/&quot;&gt;How to create a WSDL-first SOAP client in Java with CXF and Maven&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing I did different was use a property to specify the CXF version in one place:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;  &lt;span class=&quot;nt&quot;&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;project.build.sourceEncoding&amp;gt;&lt;/span&gt;UTF-8&lt;span class=&quot;nt&quot;&gt;&amp;lt;/project.build.sourceEncoding&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;cxf.version&amp;gt;&lt;/span&gt;2.2.1&lt;span class=&quot;nt&quot;&gt;&amp;lt;/cxf.version&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.cxf&lt;span class=&quot;nt&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;cxf-rt-frontend-jaxws&lt;span class=&quot;nt&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${cxf.version}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.cxf&lt;span class=&quot;nt&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;cxf-rt-transports-http&lt;span class=&quot;nt&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${cxf.version}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Pay attention to what it says about the &lt;code class=&quot;highlighter-rouge&quot;&gt;cxf.xml&lt;/code&gt; file.  I used the &lt;a href=&quot;http://maven.apache.org/plugins/maven-eclipse-plugin/&quot;&gt;Maven Eclipse Plugin&lt;/a&gt; to generate my Eclipse project files.  If you do this, but forget the cxf.xml file, your client may still work fine in Eclipse, but when you try to use the Maven-built jar file, you will get an error like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;javax&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ws&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;WebServiceException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;service&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;factory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ServiceConstructionException&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;jaxws&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getPort&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;314&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;jaxws&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getPort&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;299&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javax&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ws&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;Service&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getPort&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Service&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Caused&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;by:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;service&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;factory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ServiceConstructionException&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;frontend&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ClientFactoryBean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ClientFactoryBean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;59&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;frontend&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ClientProxyFactoryBean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ClientProxyFactoryBean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;102&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;jaxws&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;JaxWsProxyFactoryBean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;JaxWsProxyFactoryBean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;115&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;jaxws&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;createPort&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;434&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;jaxws&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getPort&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ServiceImpl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;312&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;33&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;more&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Caused&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;by:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cxf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;BusException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;No&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;binding&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;factory&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;http:&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;//schemas.xmlsoap.org/wsdl/soap/ registered.&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;So make sure to put the &lt;code class=&quot;highlighter-rouge&quot;&gt;cxf.xml&lt;/code&gt; file in your &lt;code class=&quot;highlighter-rouge&quot;&gt;src/main/resources&lt;/code&gt; folder (create that folder if it doesn’t exist).&lt;/p&gt;
</content>
 </entry>
 
 
</feed>
