atmire-1742 : Use shellscript env to determine handle server

atmire-1742 : Use shellscript env to determine handle server rather than java