shutdown system/myeclipse

Hi All,
I have one situation to shut-down the system through shell script.I need script command to shut-down the system and process should end(safe-mode) the MyEclipse.