Mr Kandy, your code that you gave me about executing a shell command worked well whith dir that doesn't take any arguments. i tried it with whois but it returned a null message on the screen. the whois command whois -h server query take -h, server and query as arguments also the java code must wait for the whois to be complete if you are kind to tell how can i change the code in order to the whois to be successful thank you