<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-23585923</id><updated>2009-10-18T09:16:26.256-07:00</updated><title type='text'>Yet Another Blog</title><subtitle type='html'>None of the content is original, so don't waste your time reading this blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-23585923.post-3443206759820114999</id><published>2007-06-20T07:46:00.000-07:00</published><updated>2007-06-20T08:11:43.738-07:00</updated><title type='text'>VMware player on Fedora 5</title><content type='html'>&lt;a href="https://www.vmware.com/download/"&gt;Download&lt;/a&gt; and install the VMware Player, i have used the 2.0 for this:
&lt;br&gt;&lt;code&gt;
# rpm -Uvh VMware-player-2.0.0-45731.i386.rpm
&lt;/code&gt;
&lt;p&gt;Now if we try to execute the player, we will get something like this:
&lt;blockquote&gt;&lt;code&gt;
# vmplayer
&lt;br&gt;vmware is installed, but it has not been (correctly)
configured for this system. To (re-)configure it,
invoke the following command: /usr/bin/vmare-config.pl.
&lt;/code&gt;&lt;/blockquote&gt;
This is requering us to execute the configuration script &lt;code&gt;/usr/bin/vmare-config.pl&lt;/code&gt;. This is a wizard were ask us for paths, i chose the default for all the questions.
&lt;blockquote&gt;&lt;code&gt;
# /usr/bin/vmware-config.pl
&lt;br&gt;Making sure services for VMware Player are stopped.

&lt;br&gt;Stopping VMware services:
   Virtual machine monitor                                 [  OK  ]

&lt;br&gt;Configuring fallback GTK+ 2.4 libraries.
&lt;br&gt;
&lt;br&gt;In which directory do you want to install the theme icons?
[/usr/share/icons]
...
&lt;/code&gt;&lt;/blockquote&gt;

In some point the script ask us to build the vmmon modules so we answer &lt;code&gt;'yes'&lt;/code&gt;
&lt;blockquote&gt;&lt;code&gt;
None of the pre-built vmmon modules for VMware Player is 
suitable for your running kernel.  Do you want this program 
to try to build the vmmon module for your system (you 
need to have a C compiler installed on your system)? [yes]
&lt;/code&gt;&lt;/blockquote&gt;

After this the wizard ask us for the kernel sources path:
&lt;blockquote&gt;&lt;code&gt;
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]
&lt;/code&gt;&lt;/blockquote&gt;
If we do not have the kernel source, we will have to install it. So we left the wizard and install the sources:
&lt;br&gt;&lt;code&gt;
# yum install kernel-devel
&lt;/code&gt;
&lt;br&gt;So far so good, for me &lt;code&gt;yum&lt;/code&gt; installed the sources in &lt;code&gt;/usr/src/kernels/2.6.20-1.2319.fc5-i686&lt;/code&gt; the headers that the wizard ask us are in &lt;code&gt;include&lt;/code&gt; directory. Now we pass this full path to the wizard and get:
&lt;blockquote&gt;&lt;code&gt;
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] /usr/src/kernels/2.6.20-1.2319.fc5-i686/include
&lt;br&gt;
&lt;br&gt;Extracting the sources of the vmmon module.
&lt;br&gt;
&lt;br&gt;Building the vmmon module.
&lt;br&gt;
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config4/vmmon-only'
make -C /usr/src/kernels/2.6.20-1.2925.fc6-i586/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.20-1.2925.fc6-i586'
&lt;br&gt;...
&lt;br&gt;make[1]: Leaving directory `/usr/src/kernels/2.6.20-1.2925.fc6-i586'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config4/vmmon-only'
&lt;br&gt;Unable to build the vmmon module.
&lt;br&gt;
For more information on how to troubleshoot module-related problems, please 
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
&lt;br&gt;
&lt;br&gt;&lt;strong&gt;Execution aborted&lt;/strong&gt;.
&lt;/code&gt;&lt;/blockquote&gt;

Damn, what went wrong? After some googling you find out that the script requires the specific sources for your running kernel, &lt;code&gt;yum&lt;/code&gt; installed the last sources. So how to know what source to install? well:
&lt;blockquote&gt;&lt;code&gt;
# uname -a
&lt;br&gt;Linux localhost.localdomain &lt;strong&gt;2.6.15-1.2054_FC5&lt;/strong&gt; ...
&lt;br&gt;# uname -p
&lt;br&gt;&lt;strong&gt;i686&lt;/strong&gt;
&lt;/code&gt;&lt;/blockquote&gt;
The above tell us that we need the sources for the kernel version &lt;code&gt;2.6.15-1.2054_FC5&lt;/code&gt; and the platform &lt;code&gt;i686&lt;/code&gt;. Once we get the right sources, remove the earlier and install the right one:
&lt;blockquote&gt;&lt;code&gt;
# rpm -qa kernel-devel*
&lt;br&gt;kernel-devel-2.6.20-1.2319.fc5
&lt;br&gt;# rpm -e kernel-devel-2.6.20-1.2319.fc5
&lt;br&gt;# rpm -i kernel-devel-2.6.15-1.2054_FC5.i686.rpm
&lt;/code&gt;&lt;/blockquote&gt;

Finally we start again the script and pass the new path:
&lt;blockquote&gt;&lt;code&gt;
# /usr/bin/vmware-config.pl
&lt;br&gt;...
&lt;br&gt;What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.15-1.2054_FC5/build/include] &lt;strong&gt;/usr/src/kernels/2.6.15-1.2054_FC5-i686/include&lt;/strong&gt;
&lt;br&gt;...
&lt;br&gt;...
&lt;br&gt;&lt;strong&gt;The module loads perfectly in the running kernel.&lt;/strong&gt;
&lt;br&gt;...
&lt;/code&gt;&lt;/blockquote&gt;

After building the module successfully, the wizard will ask for other options, i agree with the defaults and all worked smoothly.

&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/p&gt;
&lt;a href="http://tredosoft.com/node/9"&gt;VMware on Fedora Core 5&lt;/a&gt;
&lt;br&gt;&lt;a href="http://www.howtoforge.com/vmware_server_fedora_core_6"&gt;VMware Server On A Fedora Core 6&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-3443206759820114999?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/3443206759820114999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=3443206759820114999' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/3443206759820114999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/3443206759820114999'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2007/06/vmware-player-on-fedora-5.html' title='VMware player on Fedora 5'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-1192235850743968241</id><published>2007-03-20T06:41:00.000-07:00</published><updated>2007-03-20T12:23:41.909-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Tomcat as service</title><content type='html'>Simple steps to setup &lt;a href="http://tomcat.apache.org/"&gt;Tomcat&lt;/a&gt; as service on Redhat:
&lt;ol&gt;
&lt;li&gt;put this &lt;a href="http://geekability.tripod.com/linux/tomcat"&gt;script&lt;/a&gt; on &lt;code&gt;/etc/init.d/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;edit it, so that the variables &lt;code&gt;JAVA_HOME&lt;/code&gt; and &lt;code&gt;TOMCAT_HOME&lt;/code&gt; are pointing to correct locations on your system, for instance the script is setted with:
&lt;br&gt;
&lt;code&gt;
TOMCAT_HOME=/opt/tomcat
&lt;br&gt;JAVA_HOME=/usr/java/jdk1.5.0_09
&lt;/code&gt;
&lt;/li&gt;

&lt;li&gt;set execution permision to the script:
&lt;br&gt;&lt;code&gt;
# chmod a+x /etc/init.d/tomcat
&lt;/code&gt;
&lt;/li&gt;

&lt;li&gt;add a &lt;code&gt;tomcat&lt;/code&gt; user, if there is no one already 
&lt;br&gt;&lt;code&gt;
# adduser tomcat
&lt;/code&gt;
&lt;/li&gt;

&lt;li&gt;make &lt;code&gt;tomcat&lt;/code&gt; user the owner of &lt;code&gt;TOMCAT_HOME&lt;/code&gt; directory, for instance 
&lt;br&gt;&lt;code&gt;
# chown -R tomcat:tomcat /opt/tomcat/
&lt;/code&gt;
&lt;/li&gt;

&lt;li&gt;finally, install the script as service
&lt;br&gt;&lt;code&gt;
# chkconfig --add tomcat
&lt;/code&gt;
&lt;/li&gt;

&lt;/ol&gt;
now it is easier to manage tomcat with the comands:
&lt;br&gt;&lt;code&gt;
# service tomcat [start|status|stop]
&lt;/code&gt;

&lt;br&gt;
&lt;strong&gt;Source: &lt;/strong&gt; &lt;a href="http://www.spaceprogram.com/knowledge/2004/01/starting-tomcat-as-service-on-linux.html"&gt;http://www.spaceprogram.com/knowledge/2004/01/starting-tomcat-as-service-on-linux.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-1192235850743968241?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/1192235850743968241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=1192235850743968241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/1192235850743968241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/1192235850743968241'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2007/03/tomcat-as-service.html' title='Tomcat as service'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-6299748749830606029</id><published>2007-02-03T12:34:00.000-08:00</published><updated>2007-02-05T06:59:48.139-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Obfuscation for dummies</title><content type='html'>Most people who worry about obfuscation shouldn't. &lt;strong&gt;Nobody wants your code :)&lt;/strong&gt;.
Byte-code encryption &lt;a href="http://www.javaworld.com/javaworld/javaqa/2003-05/01-qa-0509-jcrypt.html"&gt;does not work&lt;/a&gt;, so
obfuscation only makes reverse engineering sligthly more difficult. 

At the other end of the scale, mobile development pretty much mandates obfuscation: files need to be as small as possible.

&lt;p&gt;&lt;strong&gt;Obfuscation Tools&lt;/strong&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;a href="http://proguard.sourceforge.net/"&gt;ProGuard&lt;/a&gt; Shrinker and obfuscator, JME support. Comes with a wizard, pretty straightforward&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.elegant-software.com/software/jmangle/"&gt;JMangle&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="www.retrologic.com"&gt;Retroguard&lt;/a&gt; Shrinker and obfuscate JME applications&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.yworks.com/en/products_yguard_about.htm"&gt;yGuard&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
  
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=17383"&gt;Observations&lt;/a&gt;&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Any methods that are accesssed via reflection need to be excluded from obfuscation&lt;/li&gt;
&lt;li&gt;properly obfuscating swing applications is very difficult due to the dynamic nature of the swing components&lt;/li&gt;
&lt;li&gt;expect to spend several iterations of full regression sweeps to validate the obfuscated product&lt;/li&gt;
&lt;li&gt;if you are adding obfuscation late in the development cycle, expect to produce parallel builds (obfuscated and non obfuscated) so that QA can repro bugs. One big problem with debugging obfuscated code is the fact that you will not get a stack trace that's meaningful&lt;/li&gt;
&lt;li&gt;obfuscation will drastically reduce your jarsize and your memory footprint&lt;/li&gt;
&lt;li&gt;good luck patching an obfuscated applicaiton in the field. You will probably have to redeliver a new jar instead of just the updated classes&lt;/li&gt;
&lt;/ul&gt;
  
&lt;p&gt;&lt;strong&gt;Issues&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Use of dynamic techniques like Bean introspection, external IOC configuration and in general &lt;a href="http://www.devx.com/wireless/Article/28989/0"&gt;reflection are break 
  with obfuscation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Security by obscurity never works&lt;/li&gt;
&lt;li&gt;Obfuscation &lt;a href="http://forum.springframework.org/showthread.php?t=22274"&gt;doesn't work very well&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.javaworld.com/javaworld/javaqa/2003-05/01-qa-0509-jcrypt.html"&gt;Recovering&lt;/a&gt; the original exception stack traces could become difficult&lt;/li&gt;
&lt;/ul&gt;
  
&lt;p&gt;&lt;strong&gt;Conclusions&lt;/strong&gt;  
&lt;ul&gt;
&lt;li&gt;Obfuscation is not the ultimate solution but if the client feel better if the code is obfuscated then &lt;a href="http://forum.java.sun.com/thread.jspa?threadID=712642&amp;amp;messageID=4486623"&gt;we will have to do it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Your are screwed if you use reflection&lt;/li&gt;
&lt;/ul&gt;
  
&lt;p&gt;&lt;strong&gt;Decompilers&lt;/strong&gt;
&lt;p&gt;Java Decompiler &lt;a href="http://kpdus.tripod.com/jad.html"&gt;JAD&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-6299748749830606029?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/6299748749830606029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=6299748749830606029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/6299748749830606029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/6299748749830606029'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2007/02/obfuscation-for-dummies.html' title='Obfuscation for dummies'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-117009888361907111</id><published>2007-01-29T11:19:00.000-08:00</published><updated>2007-02-06T06:42:13.131-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Alternatives to SUN JVM</title><content type='html'>Alternatives Virtual Machines to SUN JVM
&lt;ul&gt;
 &lt;li&gt;&lt;a href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;amp;FP=/content/products/jrockit/"&gt;BEA JRockit&lt;/a&gt; (&lt;a href="http://commerce.bea.com/index.jsp?DL=www_JRockit_icon&amp;amp;WT.ac=DL_www_JRockit_icon"&gt;compatible Java 5&lt;/a&gt;), claim up to 15% on improved performance. &lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.freebsdfoundation.org/downloads/java.shtml"&gt;Diablo&lt;/a&gt;, a port of SUN JVM to FreeBSD.&lt;/li&gt;
   &lt;li&gt;&lt;a href="http://www-128.ibm.com/developerworks/java/jdk/"&gt;IBM SDK&lt;/a&gt;&lt;/li&gt;
   &lt;ul&gt;
      &lt;li&gt;&lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=43924"&gt;Compatible&lt;/a&gt; &lt;a href="https://www14.software.ibm.com/iwm/web/cc/earlyprograms/ibm/java6/"&gt;Java 6 Early Release&lt;/a&gt; &lt;/li&gt;
   &lt;/ul&gt;
 &lt;li&gt;&lt;a href="http://www.blackdown.org/"&gt;Blackdown&lt;/a&gt;, a JVM for Linux&lt;/li&gt;
  
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-117009888361907111?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/117009888361907111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=117009888361907111' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/117009888361907111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/117009888361907111'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2007/01/alternatives-to-sun-jvm.html' title='Alternatives to SUN JVM'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-117009743712993804</id><published>2007-01-29T10:55:00.000-08:00</published><updated>2007-02-05T07:15:25.637-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Design By Contract</title><content type='html'>Something that i should check, as much as unit testing. 
  For theory, see the &lt;a href="http://se.ethz.ch/~meyer/"&gt;Bertrand Meyer&lt;/a&gt; book "&lt;em&gt;Object-Oriented Software Construction&lt;/em&gt;"

  &lt;p&gt;&lt;strong&gt;Libraries&lt;/strong&gt;
  &lt;ul&gt;
 &lt;li&gt;&lt;a href="http://springcontracts.sourceforge.net/"&gt;SpringContracts&lt;/a&gt; &lt;/li&gt;
 &lt;ul&gt;
   &lt;li&gt;&lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=43751"&gt;ServerSide posts&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
  &lt;li&gt;&lt;a href="http://www.mmsindia.com/JMSAssert.html"&gt;JMSAssert&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.parasoft.com/jsp/products/home.jsp?product=Jcontract"&gt;JContract&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://jcontractor.sourceforge.net/"&gt;JContractor&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://barter.sourceforge.net/"&gt;Barter&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.icontract2.org/"&gt;iContract2&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://csd.informatik.uni-oldenburg.de/~jass/index.html"&gt;Jass&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.contract4j.org/contract4j"&gt;contract4j&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://c4j.sourceforge.net/"&gt;C4J&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-117009743712993804?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/117009743712993804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=117009743712993804' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/117009743712993804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/117009743712993804'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2007/01/design-by-contract.html' title='Design By Contract'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-117009233532685430</id><published>2007-01-29T09:15:00.000-08:00</published><updated>2007-07-05T07:20:45.935-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Subversion for dummies</title><content type='html'>Basic steps to install &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; on any Red Hat based linux flavor, using FSFS file system storage.
&lt;pre&gt;
# yum install subversión
# adduser svn
# su svn
# mkdir /repos
(svn)$ svnadmin create --fs-type fsfs /repos
&lt;/pre&gt;

By the way, make sure that the user &lt;code&gt;svn&lt;/code&gt; owns &lt;code&gt;/repos&lt;/code&gt; directory and that everybody has write permissions on it:
&lt;pre&gt;
# chown -R svn:svn /repos
# chmod a+w -R /repos 
&lt;/pre&gt;

Afterwards, access the repository through your ssh account with &lt;code&gt;svn+ssh://127.0.0.1/repos&lt;/code&gt;.

&lt;p&gt;&lt;strong&gt;Backup a repository&lt;/strong&gt;
&lt;p&gt;To backup a repository
&lt;pre&gt;
# svnadmin dump /path/repository &gt; /backup/repository.dump
&lt;/pre&gt;
Then to recover a backed up repository
&lt;pre&gt;
# svnadmin load /path/repository &lt; repository.dump
&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Polarion Subversive&lt;/strong&gt;
&lt;p&gt;This is a plug-in for &lt;a href="http://www.eclipse.org"&gt;Eclipse&lt;/a&gt;. To install it, define a new site for this feature, on Software Updates, define a new Remote Site:
&lt;ul&gt;
 &lt;li&gt;Name: Polarion Subversive&lt;/li&gt;
 &lt;li&gt;URL: &lt;a href="http://www.polarion.org/projects/subversive/download/1.1/update-site/"&gt;http://www.polarion.org/projects/subversive/download/1.1/update-site/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Then follow the wizard, and select the options &lt;span style="font-style:italic;"&gt;Subversive&lt;/span&gt; and &lt;span style="font-style:italic;"&gt;Subversive Clients&lt;/span&gt; to install.

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_jtZdgjTEwk8/RnwOO6rrDPI/AAAAAAAAAAM/58jZ4gU5RwI/s1600-h/subversive.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_jtZdgjTEwk8/RnwOO6rrDPI/AAAAAAAAAAM/58jZ4gU5RwI/s320/subversive.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5078950129200467186" /&gt;&lt;/a&gt;


&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;a href="http://svnbook.red-bean.com/en/1.1/index.html"&gt;http://svnbook.red-bean.com/en/1.1/index.html&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.1x4x9.info/files/subversion/html/online-chunked/index.html"&gt;http://www.1x4x9.info/files/subversion/html/online-chunked/index.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-117009233532685430?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/117009233532685430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=117009233532685430' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/117009233532685430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/117009233532685430'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2007/01/subversion-for-dummies.html' title='Subversion for dummies'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_jtZdgjTEwk8/RnwOO6rrDPI/AAAAAAAAAAM/58jZ4gU5RwI/s72-c/subversive.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-116126511722039390</id><published>2006-10-19T06:38:00.000-07:00</published><updated>2007-03-21T08:39:26.882-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Derby for Dummies</title><content type='html'>If you are looking for a lightweight database that starts along with &lt;a href="http://tomcat.jakarta.org"&gt;Tomcat&lt;/a&gt;, then &lt;a href="http://db.apache.org/derby/"&gt;Derby&lt;/a&gt; could be a good choice.
The following is how to run an instance of Derby on Tomcat. This is based on the &lt;b&gt;casual scenary&lt;/b&gt; of the article &lt;a href="http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0508bader/?ca=dgr-lnxw03CloudscapeCookbook"&gt;Integrate Derby with Tomcat&lt;/a&gt; by Lance Bader.


&lt;p&gt;&lt;strong&gt;Derby basics&lt;/strong&gt;&lt;/p&gt;
If we read a litle about Derby we know that Derby can be used in two ways: as a embedded database, that is, Derby as part of our application and we start and stop it from the code application itself. For example, to start Derby in embedded way we just need to load the Derby driver:
&lt;blockquote&gt;&lt;code&gt;Connection cnx = DriverManager.getConnection("jdbc:derby:my-db;create=true");
&lt;/code&gt;&lt;/blockquote&gt;the above starts the Derby engine. To shutdown the engine we issue &lt;code&gt;"jdbc:derby:;shutdown=true"&lt;/code&gt;. The embedded way only supports one connection at a time, we will get an ugly exception if try to get another connection when there is already one connection running, something like this:
&lt;blockquote&gt;&lt;code&gt;ERROR XJ040: Failed to start database 'my-db', see the next exception for details.
ERROR XSDB6: Another instance of Derby may have already booted the database \my-db.
&lt;/code&gt;&lt;/blockquote&gt;If we want to use Derby in a embedded way, we only need to put Derby engine &lt;code&gt;derby.jar&lt;/code&gt; in the &lt;code&gt;CLASSPATH&lt;/code&gt;.

&lt;p&gt;The second way to use Derby is on client/server mode, this allow us to open as many connections as we want. This way uses the library &lt;code&gt;derbynet.jar&lt;/code&gt; to wrap the Derby engine &lt;code&gt;derby.jar&lt;/code&gt; so it is able to listen for tcp connections on a specific port. In order to do this is necesary to create an instance of &lt;code&gt;org.apache.derby.drda.NetworkServerControl&lt;/code&gt; and call its method &lt;code&gt;start()&lt;/code&gt; to start a threat which listens for connections on a tcp port, usually 1527. Next and example of how to do this:
&lt;blockquote&gt;&lt;code&gt;NetworkServerControl server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"), 1527);
server.start(new PrintWriter(System.out));
&lt;/code&gt;&lt;/blockquote&gt;to shutdown the server call the method &lt;code&gt;server.shutdown()&lt;/code&gt;. 

&lt;p&gt;In order to connect to this Derby mode we issue
&lt;blockquote&gt;&lt;code&gt;...getConnection("jdbc:derby://localhost:1527/my-db;create=true");
&lt;/code&gt;&lt;/blockquote&gt;
or we can give the complete path to the database in this way
&lt;blockquote&gt;&lt;code&gt;...getConnection("jdbc:derby://localhost:1527//home/user/my-db;create=true");
&lt;/code&gt;&lt;/blockquote&gt;
also, put the library &lt;code&gt;derbyclient.jar&lt;/code&gt; on the &lt;code&gt;CLASSPATH&lt;/code&gt; in order to the above code works.


&lt;p&gt;&lt;strong&gt;Derby Libraries&lt;/strong&gt;&lt;/p&gt;
The next chart belong to the article &lt;a href="http://db.apache.org/derby/docs/dev/pt_BR/getstart/pt_BR/getstart-single.html"&gt;Introdução ao Derby&lt;/a&gt; 


&lt;p&gt;&lt;strong&gt;Command Line interface&lt;/strong&gt;&lt;/p&gt;
Remember to use single quotes from ij tool.


&lt;p&gt;&lt;strong&gt;Wiring Derby and Tomcat&lt;/strong&gt;&lt;/p&gt;
Lets start for the easiest part, download &lt;a href="http://db.apache.org/derby/derby_downloads.html"&gt;Derby libraries&lt;/a&gt; and put them on Tomcat. We want that Derby be loaded when Tomcat service start so we have three posibles directories where put Derby libraries:
&lt;blockquote&gt;&lt;code&gt;
-  tomcat-home/common/lib
&lt;br&gt;-  tomcat-home/shared/lib
&lt;br&gt;-  tomcat-home/server/lib
&lt;/code&gt;&lt;/blockquote&gt;The libraries located on &lt;code&gt;common/&lt;/code&gt; and &lt;code&gt;shared/&lt;/code&gt; are accesibles for all the aplications running on Tomcat. For instance, if we put &lt;code&gt;derby.jar&lt;/code&gt; on &lt;code&gt;tomcat-home/common/lib/&lt;/code&gt;, this is like we had Derby on &lt;code&gt;web-app/WEB-INF/lib/derby.jar&lt;/code&gt;, that is, locally to our web application &lt;code&gt;web-app&lt;/code&gt;. On the other hand, the directory &lt;code&gt;server/&lt;/code&gt; is reserved to Tomcat specific libraries, i picked this direcory just for fun.


We want Derby on client/server mode, so we need that somehow Tomcat calls &lt;code&gt;org.apache.derby.drda.NetworkServerControl&lt;/code&gt;'s &lt;code&gt;start()&lt;/code&gt; and &lt;code&gt;shutdown()&lt;/code&gt; for us, that is, start and shutdown Derby server. One way to do this is implementing the interface &lt;code&gt;org.apache.catalina.LifecycleListener&lt;/code&gt;. Now lets say that we have a class &lt;a href="http://geekability.tripod.com/java/DerbyLifecycleListener.java"&gt;&lt;code&gt;com.my.packege.DerbyLifecycleListener&lt;/code&gt;&lt;/a&gt; 
who does that. We have to put this class on &lt;code&gt;tomcat-home/server/classes/&lt;/code&gt; or we can create a jar file and put it on &lt;code&gt;tomcat-home/server/lib/&lt;/code&gt;

&lt;p&gt;Next we have to wire this class with Tomcat, this is done setting &lt;code&gt;tomcat-home/conf/server.xml&lt;/code&gt; on the listeners section like this:
&lt;pre&gt;
&amp;lt;Listener className="org.apache.catalina.core.Apr..."/&amp;gt;
&amp;lt;Listener className="org.apache.catalina.mbeans...."/&amp;gt;
&amp;lt;Listener className="org.apache.catalina.mbeans..."/&amp;gt;
&amp;lt;Listener className="org.apache.catalina.store..."/&amp;gt;
&lt;strong&gt;&amp;lt;Listener className="com.my.packege.DerbyLifecycleListener"/&amp;gt;&lt;/strong&gt;
&lt;/pre&gt;
Tomcat will load &lt;code&gt;DerbyLifecycleListener&lt;/code&gt; every time it boots up so Derby engine will be listen for connections. Of course the libraries &lt;code&gt;derbynet.jar&lt;/code&gt; and &lt;code&gt;derby.jar&lt;/code&gt; must be on &lt;code&gt;tomcat-home/server/lib&lt;/code&gt; so &lt;code&gt;DerbyLifecycleListener&lt;/code&gt; load them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-116126511722039390?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/116126511722039390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=116126511722039390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/116126511722039390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/116126511722039390'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2006/10/derby-for-dummies.html' title='Derby for Dummies'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-115836331304030384</id><published>2006-09-15T15:51:00.000-07:00</published><updated>2007-01-30T07:38:22.798-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Optimizing Desktop Performance</title><content type='html'>I started looking for ways to optimize the performance of my Fedora 5 system, since it just have 256MB of RAM and my cheap boss does not have any intention for buy more. For example, while i am writing those lines, the memory usage was:
&lt;pre&gt;
# free -m
             total   used   free  shared  buffers  cached
Mem:           217    212      5       0        0      45
-/+ buffers/cache:    166     51
Swap:         1027     92    934
&lt;/pre&gt;
and I just have openned Opera 9 with 8 tabs, a terminal console and Gaim. At this point, i can not complain about the performance, but as soon as I start to open new applications, I see how the amount of used swap grows and my desktop becomes really slow.

One interesting source of desktop performance is Tom Adelstein's series &lt;a href="http://www.linuxjournal.com/article/8308"&gt;I&lt;/a&gt;, &lt;a href="http://www.linuxjournal.com/article/8317"&gt;II&lt;/a&gt;, &lt;a href="http://www.linuxjournal.com/article/8322"&gt;III&lt;/a&gt;, and the posts are a great complement of the articles.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-115836331304030384?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/115836331304030384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=115836331304030384' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/115836331304030384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/115836331304030384'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2006/09/optimizing-desktop-performance.html' title='Optimizing Desktop Performance'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-115046707226464324</id><published>2006-06-16T06:00:00.000-07:00</published><updated>2007-01-30T07:37:55.677-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Dual Boot Setup</title><content type='html'>&lt;p&gt;Following are the steps to get dual-boot working with GRUB; for more details you should go to the original &lt;a href="http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html"&gt;source&lt;/a&gt; of this post. I used to install first Windows 2000 or Windows XP and use the Windows boot loader (NTLDR) installed in MBR to launch GRUB. Also, this should work on Windows NT (all 3 OSs use the same booting architecture).&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Install GRUB on the first sector of the &lt;tt&gt;/boot&lt;/tt&gt; partition. &lt;b&gt;DO NOT INSTALL IT ON THE MBR!&lt;/b&gt;.&lt;div&gt;If you are performing the Red Hat installation, for the "Boot Loader Installation" screen:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Select "Use GRUB as the boot loader"&lt;/li&gt;&lt;li&gt;Select Install Boot Loader record on "...First sector of boot partition".&lt;/li&gt;&lt;li&gt;After finishing the Red Hat installation, reboot into Linux. If you don't have a boot disk, try booting in linux rescue mode&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;If you already have Linux installed:&lt;ul&gt;&lt;li&gt;Run the following command (e.g. assuming &lt;tt&gt;/boot&lt;/tt&gt; is&lt;br/&gt;&lt;tt&gt;/dev/hda2&lt;/tt&gt;): &lt;tt&gt;grub-install /dev/hda2&lt;/tt&gt;.&lt;div&gt;If you don't know which partition contains &lt;tt&gt;/boot&lt;/tt&gt;, run the &lt;tt&gt;df&lt;/tt&gt; command and check the output.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Edit &lt;tt&gt;/etc/grub.conf&lt;/tt&gt; and make sure there is an entry for your version of Windows.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Determine which partition contains the &lt;tt&gt;/boot&lt;/tt&gt; partition by running the &lt;tt&gt;df&lt;/tt&gt; command. You'll see output like this:&lt;pre&gt;Filesystem 1k-blocks     Used Available Use% Mounted on
/dev/hda3    8665372  1639580   6585612  20% /
/dev/hda2      46636     5959     38269  14% /boot
/dev/hda6     513776   189504    324272  37% /mnt/shared
none          256624        0    256624   0% /dev/shm&lt;/pre&gt;From this output, we see that &lt;tt&gt;/boot&lt;/tt&gt; is on &lt;tt&gt;/dev/hda2&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;Make a copy of the Linux boot sector onto a floppy or onto a FAT32 partition. We'll name this copy &lt;tt&gt;linux.bin&lt;/tt&gt;. To make a copy onto a floppy:&lt;ul&gt;&lt;li&gt;Mount the floppy drive if it's not mounted (assumes &lt;tt&gt;/mnt/floppy&lt;/tt&gt; exists): &lt;tt&gt;mount -t msdos /dev/fd0 /mnt/floppy&lt;/tt&gt;&lt;/li&gt;&lt;li&gt;Run the following command: &lt;tt&gt;dd if=/dev/hda2 of=/mnt/floppy linux.bin bs=512 count=1&lt;/tt&gt;&lt;div&gt;Substitute the path for the &lt;tt&gt;if=&lt;/tt&gt; parameter (the input file) with the appropriate partition from the previous step. E.g., set &lt;tt&gt;if=&lt;/tt&gt; to &lt;tt&gt;/dev/hda2&lt;/tt&gt;.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;To make a copy onto a FAT32 (vfat) partition:&lt;ul&gt;&lt;li&gt;Mount the FAT32 partition if it's not mounted yet. If it isn't listed in the &lt;tt&gt;df&lt;/tt&gt; output, it hasn't been mounted yet. &lt;/li&gt;&lt;li&gt;Run the following command: &lt;tt&gt;dd if=/dev/hda2of=/mnt/shared/linux.bin bs=512 count=1&lt;/tt&gt;, substitute the path for the &lt;tt&gt;if=&lt;/tt&gt; parameter (the inputfile) with the appropriate partition from the previous step. E.g., set &lt;tt&gt;if=&lt;/tt&gt; to &lt;tt&gt;/dev/hda2&lt;/tt&gt;. Substitute the path for the &lt;tt&gt;of=&lt;/tt&gt; parameter (the output file) with whatever is appropriate for your system. The example here (&lt;tt&gt;of=/mnt/shared/linux.bin&lt;/tt&gt;) is for copying onto a FAT32 partition called &lt;tt&gt;osshare&lt;/tt&gt;.&lt;/tt&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Reboot into Windows&lt;/li&gt;&lt;li&gt;Copy the &lt;tt&gt;linux.bin&lt;/tt&gt; file to &lt;tt&gt;C:\&lt;/tt&gt;&lt;/li&gt;&lt;li&gt;Run notepad and edit &lt;tt&gt;C:\boot.ini&lt;/tt&gt;. Note that &lt;tt&gt;C:\boot.ini&lt;/tt&gt; is a hidden system file, so it probably won't show up in Windows Explorer. To edit the file, try: &lt;tt&gt;Start-&amp;gt;Run&lt;/tt&gt; and enter: &lt;tt&gt;notepad C:\boot.ini&lt;/tt&gt;. Add the following line at the end: &lt;tt&gt;c:\linux.bin="Linux"&lt;/tt&gt;. If your &lt;tt&gt;C:&lt;/tt&gt; filesystem is NTFS (not FAT32), you must edit &lt;tt&gt;C:\boot.ini&lt;/tt&gt; as a user with administrator-level privileges. To make &lt;tt&gt;C:\boot.ini&lt;/tt&gt; writable, you can either :&lt;ul&gt;&lt;li&gt;Use Explorer:&lt;ul&gt;&lt;li&gt;Go to &lt;tt&gt;Tools-&amp;gt;Folder Options-&amp;gt;View&lt;/tt&gt; and select &lt;tt&gt;Show hidden files and folders&lt;/tt&gt; and deselect &lt;tt&gt;Hide protected operating system files (Recommended)&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;Right-click on the file, view the &lt;tt&gt;Properties&lt;/tt&gt; and uncheck &lt;tt&gt;Read-only&lt;/tt&gt;. You can now edit the file.&lt;/li&gt;&lt;li&gt;After editing the file, restore the settings to their original state.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Use the command-line:&lt;ul&gt;&lt;li&gt;Make the file writable: &lt;tt&gt;attrib -R -S -H C:\boot.ini&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;After you've finished editing the file, put the settings back: &lt;tt&gt;attrib +R +S +H C:\boot.ini&lt;/tt&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/tt&gt;&lt;/li&gt;&lt;li&gt;Reboot again. You should be able to pick either Windows or Linux. Selecting Linux will start GRUB&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-115046707226464324?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/115046707226464324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=115046707226464324' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/115046707226464324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/115046707226464324'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2006/06/dual-boot-setup.html' title='Dual Boot Setup'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23585923.post-114597398270577257</id><published>2006-04-01T07:05:00.000-08:00</published><updated>2007-09-20T11:13:28.691-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Installing Java on Fedora</title><content type='html'>The source of this post are some threads found on &lt;a href="http://forums.fedoraforum.org/forum/showthread.php?t=96283&amp;highlight=tomcat"&gt;Fedora&lt;/a&gt; &lt;a href="http://forums.fedoraforum.org/showthread.php?t=59067&amp;page=3"&gt;Forum&lt;/a&gt;. The Java distribution used was the found at the&lt;a href="http://java.sun.com"&gt;Sun&lt;/a&gt; site, i downloaded this jdk-1_5_0_06-linux-i586-rpm.bin. Open a terminal, look for the file and give it execution permisions:
&lt;blockquote&gt;&lt;code&gt;# chmod a+x jdk-1_5_0_06-linux-i586-rpm.bin
# ./jdk-1_5_0_06-linux-i586-rpm.bin
&lt;/code&gt;&lt;/blockquote&gt;By default Fecore has installed a different version of Java, so it is necesary to tell it that uses the new one. There is a link in &lt;code&gt;/usr/bin/java&lt;/code&gt; that actually starts Java, so it needs to be pointed to the correct Java installation. The easiest way to do this (to presserve both or all installations of Java) is to use &lt;code&gt;alternatives&lt;/code&gt;. If you issue the command &lt;code&gt;alternatives --config java&lt;/code&gt; you will see a single entry pointing to something like &lt;code&gt;/usr/lib/jvm/jre-1.4.2-gcj/bin/java&lt;/code&gt;, this is the binary executed when you issue &lt;code&gt;java&lt;/code&gt; from the terminal. 

All you need to do is add the link (path) to the new installation of Java, from SUN, try the following:
&lt;blockquote&gt;&lt;code&gt;# alternatives --install /usr/bin/java java /usr/java/jdk1.5.0_06/bin/java 2
&lt;/blockquote&gt;&lt;/code&gt;Its usage is &lt;code&gt;alternatives link name path priority&lt;/code&gt;. Once you add the new Java configuration to alternatives all you need to do is activate, to tell the system this is what should be run as &lt;code&gt;/usr/bin/java&lt;/code&gt;:
&lt;blockquote&gt;&lt;code&gt;# alternatives --config java
&lt;/blockquote&gt;&lt;/code&gt;this will give you a menu of Java installations. choose the second option (hence, priority 2) and hit enter. now when you type something like &lt;code&gt;java -jar filename.jar&lt;/code&gt; it will use the SUN Java instead of the included &lt;code&gt;gcj&lt;/code&gt;. Note: you can also delete the /usr/bin/java and make a new symbolic link to the java binary of the new java installation, but i do not recommend this.

Also, some Java based applications requiere that exists a environment variable pointing to the directory where is Java installed, it is the famous &lt;code&gt;JAVA_HOME&lt;/code&gt;. In order to get this, create the file &lt;code&gt;/etc/profile.d/java.sh&lt;/code&gt; with the following content:&lt;blockquote&gt;&lt;code&gt;JAVA_HOME=/usr/java/jdk1.5.0_06
JDK_HOME=$JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:/usr/java/jdk1.5.0_06/jre/lib/rt.jar
export CLASSPATH PATH JDK_HOME JAVA_HOME&lt;/code&gt;&lt;/blockquote&gt;You can check the variable content issuing &lt;code&gt;echo $JAVA_HOME&lt;/code&gt;.

&lt;p&gt;&lt;b&gt;Source&lt;/b&gt;&lt;/p&gt;
&lt;a href="http://www.centricware.org/wiki/2007/01/28/21.58"&gt;Installing JDK6 on Debian Etch or Ubuntu&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23585923-114597398270577257?l=geekability.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://geekability.blogspot.com/feeds/114597398270577257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=23585923&amp;postID=114597398270577257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/114597398270577257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23585923/posts/default/114597398270577257'/><link rel='alternate' type='text/html' href='http://geekability.blogspot.com/2006/04/installing-java-on-fedora.html' title='Installing Java on Fedora'/><author><name>Franz</name><uri>http://www.blogger.com/profile/04803466608669890611</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02907835453533225894'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>