Tuesday, August 28, 2012


Hello All, kindle note that this blog has been moved to


Tuesday, May 22, 2012

Enable Assertions in Netbeans 7

Hello All,
  Some people were asking how they can enable assertions in Netbeans.Here is the simple answer.

In the command line execution you can add the argument -ea (enable assertions) to the run command like  : java -ea myApp.java

In netbeans,
Right click on your project name and select properties,
Click Run in the leftside panel
Then, in the right, write -ea in the input box beside VM Options, Then you are done.

This is the same way you can add any runtime parameters to netbeans

Friday, May 13, 2011

Installing tomcat6 Ubuntu 10.10

Hello all,

The following are the direct steps for installing tomcat 6 under Ubuntu and get started using it:
open a terminal and write the following commands while you are a root ( su ).

NOTE: Do not forget to restart the service after each change to get the effects applied.


apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples

The previous command installs the necessary files and libraries to run tomcat.

To insure the server has been installed, write the following in your browser:
localhost:8080 (this port can be seen and changed. look at section changing port number to know the step. )

You will get a message indicates every thing is ok. I recommend you to read it carefully, It gives you the next steps to start.

As you will read you will mostly need to do the following steps:

Add user with a manager role to be able to use the web administration tool. To do this you will need to edit /etc/tomcat6/tomcat-user.xml file

Add the following under the tag names tomcat-users

Common Used Commands:

Also There is some commands you will need frequently to start, stop, restart the service:

sudo /etc/init.d/tomcat6 start

sudo /etc/init.d/tomcat6 stop

sudo /etc/init.d/tomcat6 restart

sudo /etc/init.d/tomcat6 status

Changing Port Number

if you are running multiple web services, you may be in need to change the tomcat port (default 8080) to another UN-USED port number.

This can be done by editing the /etc/tomcat6/server.xml

Search for the following :
8080" protocol="HTTP/1.1"
redirectPort="8443" />

change the 8080 to any number you want.

Running your web applications:

your applications should be placed in /var/lib/tomcat6/webapps/
to be recognized and run though web browser. After that, you can access it directly from your web browser

I guess this all what you need to get started.

Good luck.

Mohammed Saudi

Thursday, May 12, 2011

Copy Virtual Machine ( Hard Disk VDI) in virtual box

simply issue the following command from the terminal( Linux) or cmd (windows):

VBoxManage clonevdi pathOfMyFirstHD.vdi pathOfMyCloneHd.vdi

Wednesday, May 4, 2011

Add "open in terminal" to ubuntu menu


Issue this command and you will find "Open in terminal" option appears in the shotcut menu while you are inside folders and write click in empty space.

This will open that path directly in terminal.

sudo apt-get install nautilus-open-terminal

Restart nautlius

killall nautlius

best wishes,



Install Arial Font Ubuntu

Dear all, here is the direct way to install Arial and other microsoft fonts in ubuntu.

just issue the following 2 commands as a root and accept any upcoming messages (click tab to move between options )

sudo apt-get install ttf-mscorefonts-installer
dpkg-reconfigure ttf-mscorefonts-installer

Accept some license issues and so, just by clicking Ok to the popup dialogues

you will got this message when you done
All done, no errors.
All fonts downloaded and installed.
Updating fontconfig cache for /usr/share/fonts/truetype/msttcorefonts

Good Luck,

Tuesday, May 3, 2011

RedHat Package Manager rpm guide

Hello ALL,
This is a fast tutorial on linux RedHat package manager . Let's navigate the rpm (Redhat package manager) command with its options.

rpm : no :D, It does not work without options.

Listing Packages
rpm : no :D, It does not work without options.

- Query all packages :
rpm -qa // you may add | more command to see them page by page and navigate between pages using space & enter keys

- Query Specific package
rpm -q pkgName

- Query with more details(informations) about the package
rpm -qi pkgName

-Query all files used by this package
rpm -ql pkgName

This may be enough but we can add 2 more useful options
-qf over specific file will check which packages this file belongs to or generated by.
rpm -qf file-path-name

-qlp do the same but over rpm archive , not a file

rpm -qlp package-path-name.rpm

rpm -i packageName.rpm installs the package
rpm -ivh packageName.rpm installs the package, showing you what is going on during the installation [ verbose messages with hash sign indicates the progress

Upgrading installed pacckage
rpm -U packageName.rpm upgrades the package
rpm -Uvh packageName.rpm upgrade showing you what is going on

rpm -e pkgName erase the package
rpm -e --nodeps pkgName erase and neglect the dependences messages

Verification for some package verify deifferent aspects of information related to files, owner, group, ....
detailed explanation can be found here

rpm -V pkgName
rpm -Va for all packages

Good luck,