Clone from  http://svn.code.sf.net/p/vijava/code/