put ur PrimeLocator class in another new class and make sure u specify it as the main class to be executed.... then call the PrimeWorker class and its methods from PrimeLocator