- 1). Open the Eclipse Java editor and open your Java project to load all the code files. Double-click the Java source code file you want to use to stop the thread.
- 2). Locate the section of the code you want to use to close the thread. Typically this is in a location where the thread processes are finished, so it will be at the end of your function.
- 3). Type the following code to stop the thread:
Thread.stop();
Replace "Thread" with the name of your thread variable.
previous post
next post