Implemented java runnable.