Using command option -mno-cygwin to compile a C++ code on Cygwin makes it runnable not only on Cygwin but also on native Windows/DOS environments.
Quick yum command
yum search …
yum install …
yum remove …
yum groupinstall “KDE (K Desktop Environment)”
Add CentOS Linux guest OS to virtualbox
During my installation of a CentOS Linux guest OS on my Windows XP host system, I found most steps are pretty straightforward according to the manual, but there are a few places costing me some time to do research on Google.
1) To install the guest addition kit, I have to find and mount the image file VBoxGuestAdditions.iso under the virtualbox program root folder, but then I met this error when running “sh VBoxLinuxAdditions-x86.run”:
Guest Additions installation
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.18-164.el5
Problems were found which would prevent the Guest Additions from installing.
Please correct these problems and try again.
After trying multiple solutions on Google, the following solution worked for me, i.e, by running:
install kernel-devel-`uname -r`
2) X-windows size is too small, maximumly only 800×600. After adding the guest addition, I am able to either modify the display file “/etc/X11/xorg.conf” under Section “Screen” to add a new Modes “1280×1024”, or directly use the System -> Display tool: under the Hardware tab, select LCD monitor type and then under the Settings tab, choose the right Resolution.
Maven 2.0.8 not working with Spring 2.5.6 and JUnit 4.4
A few days ago, I ran into a strange bug when I was running JUnit4 test. Compiling of the JUnit test package went smoothly with Maven, but the Spring beans were not initialized properly in running time, and kept being null. The version of my Spring is 2.5.6 and JUnit library is 4.4, all up to date. At the beginning, I suspected that it was a Spring configuration issue and spent lots of time playing with all sorts of bean autowire options, but in the end, I found that if I just simply upgraded Maven from 2.0.8 to the latest 2.2.1 version, everything worked correctly. So the moral of the story is that I need to keep all packages up to date and don’t miss any single one.
Eclipse
After I installed the latest Eclipse 3.4 on my home computer and launched it, I saw a warning message complaining about the Eclipse was using the JRE instead of JDK. Even though I followed the notice in the warning message and added an extra line of “-vm …” in the eclipse.ini file, it still didn’t remove the warning message. Eventually, I created a desktop shortcut with the target command as
E:\Tools\eclipse\eclipse.exe -vm E:\Tools\jdk1.6.0_16\jre\bin\javaw
The error message disappeared.
PS: I just found that the better way to solve this issue is to modify the eclipse.ini file by adding the -vm line right above the -vmargs line. Eclipse always has something strange like this one.