Welcome both of you to the Ranch! allyou wantis please read our naming policy and adjust your displayed name accordingly, thank you. The running variable should have been declared volatile.
Can't you use interrupt() method? Having stopWork() is great but what if this is not ur thread(does not have the method) or the thread is in sleep/wait mode, or waiting for IO (for example Socket s =server.accept())