public static void execute(Thread thread, long timeout) {
	thread.start();

	try {
	    thread.join(timeout);
	} catch (InterruptedException e) {
	    // Should not be interrupted normally.
	}

	if (thread.isAlive()) {
	    thread.interrupt();
	}
    }
public static void execute(Thread thread, long timeout) {
	thread.start();

	try {
	    thread.join(timeout);
	} catch (InterruptedException e) {
	    
	}

	if (thread.isAlive()) {
	    thread.interrupt();
	}
    }
public static void execute ( Thread thread , long timeout ) { thread . start ( ) ; try { thread . join ( timeout ) ; } catch ( InterruptedException e ) { // Should not be interrupted normally. } if ( thread . isAlive ( ) ) { thread . interrupt ( ) ; } }
Executes the thread with specified timeout.

@param thread
- the thread to execute.
@param timeout
- the timeout.
Executes the thread with specified timeout .